Re: fix for a segfault in _gdk_x11_copy_to_image
- From: Owen Taylor <otaylor redhat com>
- To: Sven Neumann <sven gimp org>
- Cc: gtk-devel-list gnome org
- Subject: Re: fix for a segfault in _gdk_x11_copy_to_image
- Date: Mon, 28 Jan 2002 14:24:14 -0500 (EST)
Sven Neumann <sven gimp org> writes:
> 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?
Yes looks fine. Please commit.
Thanks,
Owen
> 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]