Index: [thread] [date] [subject] [author]
  From: Olivier Galibert <galibert@pobox.com>
  To  : ggi@loria.fr
  Date: Fri, 14 Aug 1998 02:04:45 +0200

libggi/X* XImage creation bug

Without  that,  non-local ggi-on-x  segfaults  since xhook->ximage  is
null.

  OG.

Index: mode.inc
===================================================================
RCS file: /cvsdevel/degas/lib/libggi/display/X_common/mode.inc,v
retrieving revision 1.16
diff -u -r1.16 mode.inc
--- mode.inc	1998/08/13 14:31:32	1.16
+++ mode.inc	1998/08/13 23:55:46
@@ -482,7 +482,7 @@
 			fbaddr = (char *) malloc(tm->virt.x*tm->virt.y*vinfo.depth);
 			DPRINT("X: Buffer allocated %p.\n", fbaddr);
 
-			xhook->ximage_list[i] = XCreateImage(
+			xhook->ximage = XCreateImage(
 				xhook->display, vinfo.visual, vinfo.depth,
 				ZPixmap, /* format */
 				0, 	 /* offset */
@@ -502,6 +502,7 @@
 				= xhook->ximage->bytes_per_line;
 			LIBGGI_APPBUFS(vis)[i]->buffer.plb.pixelformat = LIBGGI_PIXFMT(vis);
 
+			xhook->ximage_list[i] = xhook->ximage;
 			DPRINT("X: Image #%d allocated.\n", i);
 		}
 	}

Index: [thread] [date] [subject] [author]