[gtk+/gtk-2-22] gdk: Allow drawable == NULL in gdk_pixmap_create_from_data() again



commit 856bb36d887d1b4ba7056a777c6ef58ab422acfd
Author: Luis Menina <liberforce freeside fr>
Date:   Tue Oct 5 02:50:00 2010 +0200

    gdk: Allow drawable == NULL in gdk_pixmap_create_from_data() again
    
    client-side windows introduced a function that assumed a non-NULL
    drawable. This call needs to be special-cased to restore functionality
    from before.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=631332

 gdk/gdkpixmap.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index 3e2f2b1..af8140f 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -275,7 +275,10 @@ gdk_pixmap_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_pixmap_create_from_data (source_drawable,
                                        data, width, height,
                                        depth, fg,bg);



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