[common] vector: allow vector_free to be used with NULL

This is done for consistency with free.
This commit is contained in:
Quantum 2021-08-22 07:47:01 -04:00 committed by Geoffrey McRae
parent b118c3b681
commit b71838a530

View File

@ -47,6 +47,8 @@ Vector * vector_create(size_t itemSize, size_t capacity)
void vector_free(Vector * vector)
{
if (!vector)
return;
free(vector->data);
free(vector);
}