diff --git a/src/util.h b/src/util.h index 60087f1..1044f7f 100644 --- a/src/util.h +++ b/src/util.h @@ -148,8 +148,10 @@ utilAllocateCStr(const char* str, u32 max_len) void utilSafeFree(void* p) { - assert(p != nullptr); - free(p); + if (p) + free(p); + else + printf("%s(), free called on nullptr\n", __FUNCTION__); } #endif