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 790171 - gtk+4, GtkCssImageIconTheme: Don't unref a NULL pointer
gtk+4, GtkCssImageIconTheme: Don't unref a NULL pointer
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.92.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-11-10 14:17 UTC by Kjell Ahlstedt
Modified: 2017-11-10 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch: GtkCssImageIconTheme: Don't try to unref a NULL pointer (976 bytes, patch)
2017-11-10 14:23 UTC, Kjell Ahlstedt
committed Details | Review

Description Kjell Ahlstedt 2017-11-10 14:17:37 UTC
In gtk_css_image_icon_theme_snapshot(), g_object_unref(icon_info) is called
without first testing if icon_info is NULL, which it can be. If it is,
g_object_unref() prints a critical message.

From gtk+/build/demos/gtk-demo/gtk4-demo:
(gtk4-demo:19335): GLib-GObject-CRITICAL **: 13:15:55.219: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Comment 1 Kjell Ahlstedt 2017-11-10 14:23:02 UTC
Created attachment 363347 [details] [review]
patch: GtkCssImageIconTheme: Don't try to unref a NULL pointer
Comment 2 Matthias Clasen 2017-11-10 14:52:29 UTC
Review of attachment 363347 [details] [review]:

sure