[gtk+/client-side-windows: 27/284] gdk_bitmap_create_from_data - drawable may be NULL



commit ac637d9d15471479ad799c9830d2564266a49c88
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Dec 4 22:26:05 2008 +0100

    gdk_bitmap_create_from_data - drawable may be NULL
---
 gdk/gdkpixmap.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index 2b6e073..4a67feb 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -252,7 +252,10 @@ gdk_bitmap_create_from_data (GdkDrawable *drawable,
 {
   GdkDrawable *source_drawable;
 
-  source_drawable = _gdk_drawable_get_source_drawable (drawable);
+  if (drawable)
+    source_drawable = _gdk_drawable_get_source_drawable (drawable);
+  else
+    source_drawable = NULL;
   return _gdk_bitmap_create_from_data (source_drawable, data, width, height);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]