summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Gorodnichev <[email protected]>2014-11-13 13:23:10 +0300
committerStefano Karapetsas <[email protected]>2014-11-18 09:46:26 +0100
commit3c8dd6e27ed244059698fd981e239a2f9fab62f8 (patch)
treea7611ccfc90146931efdfba644d413d86d8f60c6
parenta0d8947866db1486e0be0744cec62cfdcc2199d4 (diff)
downloadmate-panel-3c8dd6e27ed244059698fd981e239a2f9fab62f8.tar.bz2
mate-panel-3c8dd6e27ed244059698fd981e239a2f9fab62f8.tar.xz
fix crash if icon name is NULL
-rw-r--r--mate-panel/panel-util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mate-panel/panel-util.c b/mate-panel/panel-util.c
index 850ea8c1..838d9687 100644
--- a/mate-panel/panel-util.c
+++ b/mate-panel/panel-util.c
@@ -259,6 +259,11 @@ panel_uri_exists (const char *uri)
GIcon *
panel_gicon_from_icon_name (const char *icon_name) {
GIcon *icon = NULL;
+
+ if (icon_name == NULL) {
+ return NULL;
+ }
+
if (g_path_is_absolute(icon_name)) {
if (!g_file_test (icon_name, G_FILE_TEST_EXISTS)) {
gchar *name = g_path_get_basename (icon_name);