summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2010-01-11 22:48:06 +0100
committerMikael Magnusson <mikachu@gmail.com>2010-01-11 23:53:45 +0100
commite8b6ead25a4c266dcc6bc184626eaecedcd176eb (patch)
tree16bb9d80fa3ae522e4a750ba989927f7d0a98467 /openbox
parent567fd15eebdd44e50cef140419dbf7a336708109 (diff)
NULL ic when we failed to load an image
Diffstat (limited to 'openbox')
-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;