diff options
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index ce7804b3a..6366c8531 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -3373,16 +3373,20 @@ gdk_window_set_icon (GdkWindow *window, if (toplevel->icon_pixmap != pixmap) { + if (pixmap) + g_object_ref (pixmap); if (toplevel->icon_pixmap) g_object_unref (toplevel->icon_pixmap); - toplevel->icon_pixmap = g_object_ref (pixmap); + toplevel->icon_pixmap = pixmap; } if (toplevel->icon_mask != mask) { + if (mask) + g_object_ref (mask); if (toplevel->icon_mask) g_object_unref (toplevel->icon_mask); - toplevel->icon_mask = g_object_ref (mask); + toplevel->icon_mask = mask; } update_wm_hints (window, FALSE); |