XImage *im = NULL;
Pixmap oldp;
- if (w <= 0 || h <= 0) return;
+ if (w <= 0 || h <= 0 || x+w <= 0 || y+h <= 0) return;
g_assert(l->surface.type == Surface_Planar);
render_colormap);
g_assert(l->xftdraw != NULL);
- if (l->surface.data.planar.pixel_data != NULL)
- g_free(l->surface.data.planar.pixel_data);
+ g_free(l->surface.data.planar.pixel_data);
l->surface.data.planar.pixel_data = g_new(pixel32, w * h);
if (l->surface.data.planar.grad == Background_Solid)