From: Mikael Magnusson Date: Mon, 11 Jan 2010 21:48:06 +0000 (+0100) Subject: NULL ic when we failed to load an image X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=e8b6ead25a4c266dcc6bc184626eaecedcd176eb;p=chaz%2Fopenbox NULL ic when we failed to load an image --- 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;