Skip to content
Snippets Groups Projects
Commit 4927e6c3 authored by Eric Koegel's avatar Eric Koegel
Browse files

Prevent a crash on device update (Bug #11932)

parent 1e5d59f2
No related branches found
No related tags found
No related merge requests found
......@@ -1119,6 +1119,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
/* add the image */
battery_device->img = gtk_image_new_from_pixbuf (battery_device->pix);
g_object_ref (battery_device->img);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(mi), battery_device->img);
G_GNUC_END_IGNORE_DEPRECATIONS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment