diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2010-01-11 22:48:06 +0100 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@gmail.com> | 2010-01-11 23:53:45 +0100 |
| commit | e8b6ead25a4c266dcc6bc184626eaecedcd176eb (patch) | |
| tree | 16bb9d80fa3ae522e4a750ba989927f7d0a98467 | |
| parent | 567fd15eebdd44e50cef140419dbf7a336708109 (diff) | |
NULL ic when we failed to load an image
| -rw-r--r-- | openbox/menu.c | 4 |
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; |
