tdo not die in freeimage(0) when screen==0 - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit e4c74b87b6798b5255a3b794276cf83fea19b36d
parent 784d65506702aab589d768a5db8113aca11dd6de
Author: rsc 
Date:   Sat, 28 Jan 2006 23:45:53 +0000

do not die in freeimage(0) when screen==0

Diffstat:
  M src/libdraw/alloc.c                 |       3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/libdraw/alloc.c b/src/libdraw/alloc.c
t@@ -231,9 +231,10 @@ freeimage(Image *i)
 {
         int ret;
 
+        if(i == nil)
+                return;
         if(i == screen)
                 abort();
-
         ret = _freeimage1(i);
         free(i);
         return ret;