|
|
99600e |
From a20229f185b494a107634c4b99b2be1ce962a277 Mon Sep 17 00:00:00 2001
|
|
|
99600e |
From: Ondrej Holy <oholy@redhat.com>
|
|
|
99600e |
Date: Thu, 26 Sep 2019 11:06:45 +0200
|
|
|
99600e |
Subject: [PATCH] properties-window: Fix crashes when cancelled
|
|
|
99600e |
|
|
|
99600e |
Nautilus crashes on the "timed_wait_free: assertion failed:
|
|
|
99600e |
(g_hash_table_lookup (timed_wait_hash_table, wait) != NULL)" assertion
|
|
|
99600e |
when the creating of the properties window is cancelled. This is because
|
|
|
99600e |
the timed wait has been already removed. Let's don't remove the wait
|
|
|
99600e |
when cancelled in order to prevent the crashes.
|
|
|
99600e |
---
|
|
|
99600e |
src/nautilus-properties-window.c | 14 ++++++++++++--
|
|
|
99600e |
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
99600e |
|
|
|
99600e |
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
|
|
|
99600e |
index 969e3ffea..0112aeb3c 100644
|
|
|
99600e |
--- a/src/nautilus-properties-window.c
|
|
|
99600e |
+++ b/src/nautilus-properties-window.c
|
|
|
99600e |
@@ -148,6 +148,7 @@ typedef struct
|
|
|
99600e |
NautilusPropertiesWindowCallback callback;
|
|
|
99600e |
gpointer callback_data;
|
|
|
99600e |
NautilusPropertiesWindow *window;
|
|
|
99600e |
+ gboolean cancelled;
|
|
|
99600e |
} StartupData;
|
|
|
99600e |
|
|
|
99600e |
/* drag and drop definitions */
|
|
|
99600e |
@@ -5229,6 +5230,8 @@ get_existing_window (GList *file_list)
|
|
|
99600e |
static void
|
|
|
99600e |
properties_window_finish (StartupData *data)
|
|
|
99600e |
{
|
|
|
99600e |
+ gboolean cancel_timed_wait;
|
|
|
99600e |
+
|
|
|
99600e |
if (data->parent_widget != NULL)
|
|
|
99600e |
{
|
|
|
99600e |
g_signal_handlers_disconnect_by_data (data->parent_widget,
|
|
|
99600e |
@@ -5240,14 +5243,21 @@ properties_window_finish (StartupData *data)
|
|
|
99600e |
data);
|
|
|
99600e |
}
|
|
|
99600e |
|
|
|
99600e |
- remove_pending (data, TRUE, (data->window == NULL), FALSE);
|
|
|
99600e |
+ cancel_timed_wait = (data->window == NULL && !data->cancelled);
|
|
|
99600e |
+ remove_pending (data, TRUE, cancel_timed_wait, FALSE);
|
|
|
99600e |
+
|
|
|
99600e |
startup_data_free (data);
|
|
|
99600e |
}
|
|
|
99600e |
|
|
|
99600e |
static void
|
|
|
99600e |
cancel_create_properties_window_callback (gpointer callback_data)
|
|
|
99600e |
{
|
|
|
99600e |
- properties_window_finish ((StartupData *) callback_data);
|
|
|
99600e |
+ StartupData *data;
|
|
|
99600e |
+
|
|
|
99600e |
+ data = callback_data;
|
|
|
99600e |
+ data->cancelled = TRUE;
|
|
|
99600e |
+
|
|
|
99600e |
+ properties_window_finish (data);
|
|
|
99600e |
}
|
|
|
99600e |
|
|
|
99600e |
static void
|
|
|
99600e |
--
|
|
|
99600e |
2.23.0
|
|
|
99600e |
|