diff options
author | rsc <devnull@localhost> | 2005-11-07 02:46:38 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-11-07 02:46:38 +0000 |
commit | 148f25d3517dcdb32c566506e0cb0d6e632e4d23 (patch) | |
tree | 7549f4cab23ae592d3480c3d7ba2911a23c867bb /src/libdraw | |
parent | 3fd51250be8cd6f6ac5df5342d3b81e6ed1c01a9 (diff) | |
download | plan9port-148f25d3517dcdb32c566506e0cb0d6e632e4d23.tar.gz plan9port-148f25d3517dcdb32c566506e0cb0d6e632e4d23.tar.bz2 plan9port-148f25d3517dcdb32c566506e0cb0d6e632e4d23.zip |
debugging help
Diffstat (limited to 'src/libdraw')
-rw-r--r-- | src/libdraw/alloc.c | 3 | ||||
-rw-r--r-- | src/libdraw/init.c | 4 | ||||
-rw-r--r-- | src/libdraw/x11-init.c | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/libdraw/alloc.c b/src/libdraw/alloc.c index c1fbe5a2..53e9605b 100644 --- a/src/libdraw/alloc.c +++ b/src/libdraw/alloc.c @@ -231,6 +231,9 @@ freeimage(Image *i) { int ret; + if(i == screen) + abort(); + ret = _freeimage1(i); free(i); return ret; diff --git a/src/libdraw/init.c b/src/libdraw/init.c index 2fe18d21..2357f0ef 100644 --- a/src/libdraw/init.c +++ b/src/libdraw/init.c @@ -202,8 +202,8 @@ bufimage(Display *d, int n) { uchar *p; - if(n<0 || n>d->bufsize){ -abort(); + if(n<0 || d == nil || n>d->bufsize){ + abort(); werrstr("bad count in bufimage"); return 0; } diff --git a/src/libdraw/x11-init.c b/src/libdraw/x11-init.c index 72292671..a640e2ee 100644 --- a/src/libdraw/x11-init.c +++ b/src/libdraw/x11-init.c @@ -137,8 +137,10 @@ getwindow(Display *d, int ref) Image *i; Image *oi; - if(_x.destroyed) + if(_x.destroyed){ postnote(PNGROUP, getpgrp(), "hangup"); + return -1; + } if(xreplacescreenimage() == 0) return 0; |