--- glyphs-x.c~ Wed Oct 06 12:36:35 1999 +++ glyphs-x.c Fri Oct 08 16:24:20 1999 @@ -408,6 +408,11 @@ else { int i; + if (IMAGE_INSTANCE_X_MASK (p) && + IMAGE_INSTANCE_X_MASK (p) != IMAGE_INSTANCE_X_PIXMAP (p)) + XFreePixmap (dpy, IMAGE_INSTANCE_X_MASK (p)); + IMAGE_INSTANCE_PIXMAP_MASK (p) = 0; + if (IMAGE_INSTANCE_X_PIXMAP_SLICES (p)) { for (i = 0; i < IMAGE_INSTANCE_PIXMAP_MAXSLICE (p); i++) @@ -416,14 +421,9 @@ IMAGE_INSTANCE_X_PIXMAP_SLICE (p, i) = 0; } xfree (IMAGE_INSTANCE_X_PIXMAP_SLICES (p)); + IMAGE_INSTANCE_X_PIXMAP_SLICES (p) = 0; } - if (IMAGE_INSTANCE_X_MASK (p) && - IMAGE_INSTANCE_X_MASK (p) != IMAGE_INSTANCE_X_PIXMAP (p)) - XFreePixmap (dpy, IMAGE_INSTANCE_X_MASK (p)); - IMAGE_INSTANCE_X_PIXMAP (p) = 0; - IMAGE_INSTANCE_PIXMAP_MASK (p) = 0; - if (IMAGE_INSTANCE_X_CURSOR (p)) { XFreeCursor (dpy, IMAGE_INSTANCE_X_CURSOR (p));