diff options
author | rsc <devnull@localhost> | 2005-07-13 03:56:21 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-07-13 03:56:21 +0000 |
commit | ca63c078d9b658b2f8d99c8e3e1a2389d0e7f6d7 (patch) | |
tree | 7302d9c77e63d8c6979d4c8b69214d54f797ae41 /src/libdraw | |
parent | 2ec48bbca32b5483b746cac1f2e6121171e33544 (diff) | |
download | plan9port-ca63c078d9b658b2f8d99c8e3e1a2389d0e7f6d7.tar.gz plan9port-ca63c078d9b658b2f8d99c8e3e1a2389d0e7f6d7.tar.bz2 plan9port-ca63c078d9b658b2f8d99c8e3e1a2389d0e7f6d7.zip |
more places where display can be nil
Diffstat (limited to 'src/libdraw')
-rw-r--r-- | src/libdraw/alloc.c | 2 | ||||
-rw-r--r-- | src/libdraw/buildfont.c | 2 | ||||
-rw-r--r-- | src/libdraw/font.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libdraw/alloc.c b/src/libdraw/alloc.c index 50b96fd8..c1fbe5a2 100644 --- a/src/libdraw/alloc.c +++ b/src/libdraw/alloc.c @@ -196,7 +196,7 @@ _freeimage1(Image *i) Display *d; Image *w; - if(i == 0) + if(i == 0 || i->display == 0) return 0; /* make sure no refresh events occur on this if we block in the write */ d = i->display; diff --git a/src/libdraw/buildfont.c b/src/libdraw/buildfont.c index ba32e775..fa50b6ef 100644 --- a/src/libdraw/buildfont.c +++ b/src/libdraw/buildfont.c @@ -129,7 +129,7 @@ freefont(Font *f) } for(i=0; i<f->nsubf; i++){ s = f->subf[i].f; - if(s && s!=display->defaultsubfont) + if(s && (!display || s!=display->defaultsubfont)) freesubfont(s); } freeimage(f->cacheimage); diff --git a/src/libdraw/font.c b/src/libdraw/font.c index 7aa649e8..8370606e 100644 --- a/src/libdraw/font.c +++ b/src/libdraw/font.c @@ -132,7 +132,7 @@ agefont(Font *f) if(s->age){ if(s->age<SUBFAGE && s->cf->name != nil){ /* clean up */ - if(s->f != display->defaultsubfont) + if(display==nil || s->f != display->defaultsubfont) freesubfont(s->f); s->cf = nil; s->f = nil; |