make a private copy of the icon obtained through gtk_icon_them_load_icon
[simple-launcher] / launcher-item.cc
index 39fa274..2b8c79f 100644 (file)
@@ -162,6 +162,14 @@ GdkPixbuf *LauncherItem::getIcon(int icon_size) const {
     }
   }
 
+  if (pixbuf != NULL) {
+    GdkPixbuf *tempo = gdk_pixbuf_copy(pixbuf);
+
+    g_object_unref(pixbuf);
+
+    pifxbuf = tempo;
+  }
+
   return pixbuf;
 }