summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-09-26 11:07:35 +0200
committerOndrej Holy <oholy@redhat.com>2019-10-03 07:44:11 +0000
commit2fba37a2ddf56a9690e44b95525f52bb7ba53be9 (patch)
tree5ecd04c643e5b7514a4d41abedb3292187b93963
parentb82d5b791edf7afe8db14f136c7ae6ef603d1303 (diff)
downloadnautilus-2fba37a2ddf56a9690e44b95525f52bb7ba53be9.tar.gz
properties-window: Fix crashes when opened multiple times
Nautilus crashes with segmentation fault when closing the properties dialog after it has been opened mutliple times for the same file. This can't be reproduced over Nautilus as it uses modal dialogs, however, it can be simply reproduced over the Desktop Icons extension. Let's check the pending_key variable before used to be sure it is not NULL to fix this crashes.
-rw-r--r--src/nautilus-properties-window.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 0112aeb3c..f6b2f21a6 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -5297,7 +5297,10 @@ remove_pending (StartupData *startup_data,
eel_timed_wait_stop
(cancel_create_properties_window_callback, startup_data);
}
- g_hash_table_remove (pending_lists, startup_data->pending_key);
+ if (startup_data->pending_key != NULL)
+ {
+ g_hash_table_remove (pending_lists, startup_data->pending_key);
+ }
}
static gboolean