added null check to destructors
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#include "tlibc/string/StringBuilder.h"
|
||||
|
||||
void StringBuilder_destroy(StringBuilder* b){
|
||||
if(!b)
|
||||
return;
|
||||
|
||||
free(b->buffer.data);
|
||||
b->buffer = List_construct_size(NULL, 0, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user