diff options
author | rbuj <[email protected]> | 2020-12-26 10:33:54 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-01-06 13:32:05 +0100 |
commit | 9977c91b407f65ad3f3777b984155a35dc880096 (patch) | |
tree | cabe624183f698aacad963c1d9bad3cddf659828 /mate-panel/libpanel-util/panel-xdg.c | |
parent | 06292db3c2b9a4ad81c7063c7bcff7cb6c0f927a (diff) | |
download | mate-panel-9977c91b407f65ad3f3777b984155a35dc880096.tar.bz2 mate-panel-9977c91b407f65ad3f3777b984155a35dc880096.tar.xz |
Variable is reassigned a value before the old one has been used
Diffstat (limited to 'mate-panel/libpanel-util/panel-xdg.c')
-rw-r--r-- | mate-panel/libpanel-util/panel-xdg.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mate-panel/libpanel-util/panel-xdg.c b/mate-panel/libpanel-util/panel-xdg.c index bcdbb5fa..0b7c4c85 100644 --- a/mate-panel/libpanel-util/panel-xdg.c +++ b/mate-panel/libpanel-util/panel-xdg.c @@ -117,18 +117,12 @@ panel_xdg_icon_name_from_icon_path (const char *path, gboolean current; theme_dir = g_file_get_child (parent, theme_name); - - current = FALSE; - if (g_file_has_prefix (file, theme_dir)) { - /* it's the current one */ - current = TRUE; - } else { - /* it's the default one */ + if ((current = g_file_has_prefix (file, theme_dir)) == FALSE) { + /* fallback icon theme? */ g_object_unref (theme_dir); theme_dir = g_file_get_child (parent, DEFAULT_THEME_NAME); current = g_file_has_prefix (file, theme_dir); } - g_object_unref (theme_dir); if (current) { |