After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631332 - gdk_pixmap_create_from_data();
gdk_pixmap_create_from_data();
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.20.x
Other Linux
: Normal trivial
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-10-04 17:06 UTC by gerald.dumas
Modified: 2010-10-05 00:58 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description gerald.dumas 2010-10-04 17:06:23 UTC
The first argument GdkDrawable must be different NULL. But in the documentation it can be possible to pass NULL.

In the case Gtk+ write an error in the console : Gdk-CRITICAL **: _gdk_drawable_get_source_drawable: assertion `GDK_IS_DRAWABLE (drawable)' failed


(Excuse me for my english, i'm french...)
Comment 1 Luis Menina 2010-10-04 22:44:56 UTC
The bug has been introduced in 2.18. The function should test "drawable" like that:

  if (drawable)
    source_drawable = _gdk_drawable_get_source_drawable (drawable);
  else
    source_drawable = NULL;
 
instead of doing just:

    source_drawable = _gdk_drawable_get_source_drawable (drawable);
Comment 2 Benjamin Otte (Company) 2010-10-05 00:58:02 UTC
Committed to gtk-2-22 branch:

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.

master doesn't have this API anymore, so no need to fix it there.