From 396543790dc1c844c726b77a95c6180978232abd Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Fri, 14 Jan 2022 01:06:14 +0000 Subject: =?UTF-8?q?Add=20each=20(=C2=A8)=20operator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- memory.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'memory.c') 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); */ -- cgit v1.2.3