From e8b6ead25a4c266dcc6bc184626eaecedcd176eb Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 11 Jan 2010 22:48:06 +0100 Subject: [PATCH] NULL ic when we failed to load an image --- openbox/menu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.44.0