dmx: only free the default pixmaps that we actually allocated.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
20fb8c2e2f
commit
66ece3bfb1
|
@ -388,10 +388,13 @@ void dmxBECloseScreen(ScreenPtr pScreen)
|
||||||
} else {
|
} else {
|
||||||
/* Free the default drawables */
|
/* Free the default drawables */
|
||||||
for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) {
|
for (i = 0; i < dmxScreen->beNumPixmapFormats; i++) {
|
||||||
XFreePixmap(dmxScreen->beDisplay, dmxScreen->scrnDefDrawables[i]);
|
if (dmxScreen->scrnDefDrawables[i]) {
|
||||||
|
XFreePixmap(dmxScreen->beDisplay,
|
||||||
|
dmxScreen->scrnDefDrawables[i]);
|
||||||
dmxScreen->scrnDefDrawables[i] = (Drawable)0;
|
dmxScreen->scrnDefDrawables[i] = (Drawable)0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Free resources allocated during initialization (in dmxinit.c) */
|
/* Free resources allocated during initialization (in dmxinit.c) */
|
||||||
for (i = 0; i < dmxScreen->beNumDefColormaps; i++)
|
for (i = 0; i < dmxScreen->beNumDefColormaps; i++)
|
||||||
|
|
Loading…
Reference in New Issue