]> Dogcows Code - chaz/openbox/blobdiff - openbox/menu.c
NULL ic when we failed to load an image
[chaz/openbox] / openbox / menu.c
index 524220c0af14325eb691924ff1ea640928d44bf6..6dd6d072d797ccb59548e29eb43f8fc0ec754840 100644 (file)
@@ -299,8 +299,10 @@ static void parse_menu_item(xmlNodePtr node,  gpointer data)
                     RrImageRef(ic);
                 else {
                     ic = RrImageNew(ob_rr_icons);
-                    if (!RrImageAddPictureName(ic, icon))
+                    if (!RrImageAddPictureName(ic, icon)) {
                         RrImageUnref(ic); /* no need to keep it around */
+                        ic = NULL;
+                    }
                 }
                 e->data.normal.icon = ic;
 
This page took 0.02472 seconds and 4 git commands to generate.