diff options
-rw-r--r-- | capplets/common/mate-theme-info.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/capplets/common/mate-theme-info.c b/capplets/common/mate-theme-info.c index 6971602e..c8eca7f0 100644 --- a/capplets/common/mate-theme-info.c +++ b/capplets/common/mate-theme-info.c @@ -1215,11 +1215,14 @@ real_add_top_theme_dir_monitor (GFile *uri, tuple->priority = priority; /* Monitor the top directory */ - monitor = g_file_monitor_directory (uri, G_FILE_MONITOR_NONE, NULL, NULL); - if (monitor != NULL) { + if ((monitor = g_file_monitor_directory (uri, G_FILE_MONITOR_NONE, NULL, NULL)) != NULL) { g_signal_connect (monitor, "changed", (GCallback) (icon_theme ? top_icon_theme_dir_changed : top_theme_dir_changed), tuple); + } else { + g_hash_table_destroy (tuple->handle_hash); + g_free (tuple); + return FALSE; } /* Go through the directory to add monitoring */ |