summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-14 01:06:14 +0000
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2022-01-14 01:06:14 +0000
commit396543790dc1c844c726b77a95c6180978232abd (patch)
treeb5051f5afba137e499b883b637ce6fc436805ec5 /memory.c
parent07082593ab4abfbf9a3dd6729cb2e548ec303115 (diff)
Add each (ยจ) operator
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); */