Browse Source

replace assertion with conditional in utilSafeFree()

main
cinnaboot 5 years ago
parent
commit
2f2a496d48
  1. 6
      src/util.h

6
src/util.h

@ -148,8 +148,10 @@ utilAllocateCStr(const char* str, u32 max_len)
void void
utilSafeFree(void* p) utilSafeFree(void* p)
{ {
assert(p != nullptr); if (p)
free(p); free(p);
else
printf("%s(), free called on nullptr\n", __FUNCTION__);
} }
#endif #endif

Loading…
Cancel
Save