Commit 9ddacb01 authored by Rob Adams's avatar Rob Adams Committed by Rob Adams

harden against null return from gdk_pixmap_foreign_new. Fix for #116923.

2003-08-29  Rob Adams  <robadams@ucla.edu>

	* src/ui.c (meta_gdk_pixbuf_get_from_pixmap): harden against null
	return from gdk_pixmap_foreign_new.  Fix for #116923.
parent a4a32a54
2003-08-29 Rob Adams <robadams@ucla.edu>
* src/ui.c (meta_gdk_pixbuf_get_from_pixmap): harden against null
return from gdk_pixmap_foreign_new. Fix for #116923.
2003-08-26 Guntupalli Karunakar <karunakar@freedomink.org>
* configure.in: Added "hi" (Hindi) to ALL_LINGUAS.
......
......@@ -523,18 +523,21 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
else
drawable = gdk_pixmap_foreign_new (xpixmap);
cmap = get_cmap (drawable);
if (drawable)
{
cmap = get_cmap (drawable);
retval = gdk_pixbuf_get_from_drawable (dest,
drawable,
cmap,
src_x, src_y,
dest_x, dest_y,
width, height);
retval = gdk_pixbuf_get_from_drawable (dest,
drawable,
cmap,
src_x, src_y,
dest_x, dest_y,
width, height);
}
if (cmap)
g_object_unref (G_OBJECT (cmap));
g_object_unref (G_OBJECT (drawable));
if (drawable)
g_object_unref (G_OBJECT (drawable));
return retval;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment