summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/memory.c b/memory.c
index adc0466..fd0fec6 100644
--- a/memory.c
+++ b/memory.c
@@ -9,6 +9,9 @@ int alloccounts = 0;
void
freearray(Array *a)
{
+ if(a == nil)
+ return;
+
a->refs--;
if(a->refs == 0){
/* print("Freeing array: %S (%p)\n", pparray(a), a); */