more places where display can be nil
This commit is contained in:
parent
2ec48bbca3
commit
ca63c078d9
3 changed files with 3 additions and 3 deletions
|
|
@ -196,7 +196,7 @@ _freeimage1(Image *i)
|
||||||
Display *d;
|
Display *d;
|
||||||
Image *w;
|
Image *w;
|
||||||
|
|
||||||
if(i == 0)
|
if(i == 0 || i->display == 0)
|
||||||
return 0;
|
return 0;
|
||||||
/* make sure no refresh events occur on this if we block in the write */
|
/* make sure no refresh events occur on this if we block in the write */
|
||||||
d = i->display;
|
d = i->display;
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ freefont(Font *f)
|
||||||
}
|
}
|
||||||
for(i=0; i<f->nsubf; i++){
|
for(i=0; i<f->nsubf; i++){
|
||||||
s = f->subf[i].f;
|
s = f->subf[i].f;
|
||||||
if(s && s!=display->defaultsubfont)
|
if(s && (!display || s!=display->defaultsubfont))
|
||||||
freesubfont(s);
|
freesubfont(s);
|
||||||
}
|
}
|
||||||
freeimage(f->cacheimage);
|
freeimage(f->cacheimage);
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ agefont(Font *f)
|
||||||
if(s->age){
|
if(s->age){
|
||||||
if(s->age<SUBFAGE && s->cf->name != nil){
|
if(s->age<SUBFAGE && s->cf->name != nil){
|
||||||
/* clean up */
|
/* clean up */
|
||||||
if(s->f != display->defaultsubfont)
|
if(display==nil || s->f != display->defaultsubfont)
|
||||||
freesubfont(s->f);
|
freesubfont(s->f);
|
||||||
s->cf = nil;
|
s->cf = nil;
|
||||||
s->f = nil;
|
s->f = nil;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue