summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbox/menu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbox/menu.c b/openbox/menu.c
index 524220c0..6dd6d072 100644
--- a/openbox/menu.c
+++ b/openbox/menu.c
@@ -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;