NULL ic when we failed to load an image
This commit is contained in:
parent
567fd15eeb
commit
e8b6ead25a
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue