mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
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.
This commit is contained in:
parent
a4a32a54c3
commit
9ddacb019e
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2003-08-26 Guntupalli Karunakar <karunakar@freedomink.org>
|
||||||
|
|
||||||
* configure.in: Added "hi" (Hindi) to ALL_LINGUAS.
|
* configure.in: Added "hi" (Hindi) to ALL_LINGUAS.
|
||||||
|
5
src/ui.c
5
src/ui.c
@ -523,6 +523,8 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
|
|||||||
else
|
else
|
||||||
drawable = gdk_pixmap_foreign_new (xpixmap);
|
drawable = gdk_pixmap_foreign_new (xpixmap);
|
||||||
|
|
||||||
|
if (drawable)
|
||||||
|
{
|
||||||
cmap = get_cmap (drawable);
|
cmap = get_cmap (drawable);
|
||||||
|
|
||||||
retval = gdk_pixbuf_get_from_drawable (dest,
|
retval = gdk_pixbuf_get_from_drawable (dest,
|
||||||
@ -531,9 +533,10 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
|
|||||||
src_x, src_y,
|
src_x, src_y,
|
||||||
dest_x, dest_y,
|
dest_x, dest_y,
|
||||||
width, height);
|
width, height);
|
||||||
|
}
|
||||||
if (cmap)
|
if (cmap)
|
||||||
g_object_unref (G_OBJECT (cmap));
|
g_object_unref (G_OBJECT (cmap));
|
||||||
|
if (drawable)
|
||||||
g_object_unref (G_OBJECT (drawable));
|
g_object_unref (G_OBJECT (drawable));
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
Loading…
Reference in New Issue
Block a user