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 752520 - Crash getting a NULL visual in glx_pixmap_get
Crash getting a NULL visual in glx_pixmap_get
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-07-17 07:32 UTC by Ignacio Casal Quinteiro (nacho)
Modified: 2015-07-17 12:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk: fix crash if visual is NULL (859 bytes, patch)
2015-07-17 07:32 UTC, Ignacio Casal Quinteiro (nacho)
accepted-commit_now Details | Review

Description Ignacio Casal Quinteiro (nacho) 2015-07-17 07:32:03 UTC
So for some reason cairo_xlib_surface_get_visual returns a NULL visual and this is documented that it can happen but the NULL value is not checked at all so XVisualIDFromVisual (visual) just gives a crash.
Comment 1 Ignacio Casal Quinteiro (nacho) 2015-07-17 07:32:38 UTC
Created attachment 307601 [details] [review]
gdk: fix crash if visual is NULL

cairo_xlib_surface_get_visual might return NULL so we need to
check for NULL before trying to use it.
Comment 2 Emmanuele Bassi (:ebassi) 2015-07-17 12:25:15 UTC
Review of attachment 307601 [details] [review]:

Looks okay.
Comment 3 Ignacio Casal Quinteiro (nacho) 2015-07-17 12:26:32 UTC
Attachment 307601 [details] pushed as 186c8f5 - gdk: fix crash if visual is NULL