summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vector.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vector.c b/src/vector.c
index 24d72b7..385e600 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -112,7 +112,14 @@ vector_new(const size_t value_size, const struct Vector **const out) {
void
vector_free(const struct Vector **const v) {
- assert((*v) != NULL);
+ if (v == NULL) {
+ return;
+ }
+
+ if (*v == NULL) {
+ return;
+ }
+
const void **values = (*v)->values;
freeit((void *)&values);
freeit((void *)v);