[gedit/gnome-3-16] window: fix assertion when quitting the window
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-16] window: fix assertion when quitting the window
- Date: Thu, 21 May 2015 14:03:48 +0000 (UTC)
commit 7cd6a4042405174990d0cf8280db139afbd618ae
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu May 21 16:02:05 2015 +0200
window: fix assertion when quitting the window
gedit/gedit-window.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index b840b8e..e82e1d0 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -517,7 +517,15 @@ received_clipboard_contents (GtkClipboard *clipboard,
}
action = g_action_map_lookup_action (G_ACTION_MAP (window), "paste");
- g_simple_action_set_enabled (G_SIMPLE_ACTION (action), enabled);
+
+ /* Since this is emitted async, the disposal of the actions may have
+ * already happened. Ensure that we have an action before setting the
+ * state.
+ */
+ if (action != NULL)
+ {
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), enabled);
+ }
g_object_unref (window);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]