mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 21:43:40 +00:00
[common] vector: allow vector_free to be used with NULL
This is done for consistency with free.
This commit is contained in:
parent
b118c3b681
commit
b71838a530
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user