fix for a segfault in _gdk_x11_copy_to_image
- From: Sven Neumann <sven gimp org>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-devel-list gnome org
- Subject: fix for a segfault in _gdk_x11_copy_to_image
- Date: 28 Jan 2002 12:14:41 +0100
Hi,
current GTK+-X11 from CVS segfaults if one tries to use
the color picker from the color selection dialog because
the code tries to access a NULL GdkImage pointer. Here's
a patch that seems to fix the problem. OK to commit?
Salut, Sven
Index: gdk/x11/gdkimage-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkimage-x11.c,v
retrieving revision 1.39
diff -u -p -r1.39 gdkimage-x11.c
--- gdk/x11/gdkimage-x11.c 2002/01/04 05:58:00 1.39
+++ gdk/x11/gdkimage-x11.c 2002/01/28 11:07:41
@@ -584,8 +584,6 @@ _gdk_x11_copy_to_image (GdkDrawable *
if (!gdk_rectangle_intersect (&req, &window_rect, &req))
goto out;
- private = PRIVATE_DATA (image);
-
gdk_error_trap_push ();
if (!image &&
@@ -605,6 +603,8 @@ _gdk_x11_copy_to_image (GdkDrawable *
gdk_drawable_get_depth (drawable));
created_image = TRUE;
}
+
+ private = PRIVATE_DATA (image);
/* In the ShmImage but no ShmPixmap case, we could use XShmGetImage when
* we are getting the entire image.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]