[epiphany/gnome-3-32] Fix a runtime critical warning when starting a web application
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-32] Fix a runtime critical warning when starting a web application
- Date: Tue, 28 May 2019 14:31:32 +0000 (UTC)
commit 892306c3afa8971110599210d4af9027465adb36
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Tue May 28 08:45:11 2019 +0000
Fix a runtime critical warning when starting a web application
GLib-GObject-CRITICAL **: 09:47:02.477: g_object_bind_property_full: assertion 'G_IS_OBJECT (source)'
failed
ephy_shell_get_session() returns NULL in web app mode too.
(cherry picked from commit ec7b8031151fd9fbea17cd4fb15a9ed7bc025b91)
src/ephy-window.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 236b7d55f..7db2173bf 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -3358,6 +3358,7 @@ ephy_window_constructed (GObject *object)
EphyEmbedShellMode mode;
EphyWindowChrome chrome = EPHY_WINDOW_CHROME_DEFAULT;
GApplication *app;
+ EphySession *session;
G_OBJECT_CLASS (ephy_window_parent_class)->constructed (object);
@@ -3518,14 +3519,15 @@ ephy_window_constructed (GObject *object)
action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "tab");
action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "reopen");
- if (mode == EPHY_EMBED_SHELL_MODE_INCOGNITO || mode == EPHY_EMBED_SHELL_MODE_AUTOMATION) {
- g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
- } else {
- g_object_bind_property (G_OBJECT (ephy_shell_get_session (shell)),
+ session = ephy_shell_get_session (shell);
+ if (session) {
+ g_object_bind_property (session,
"can-undo-tab-closed",
action,
"enabled",
G_BINDING_SYNC_CREATE);
+ } else {
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
}
window->mouse_gesture_controller = ephy_mouse_gesture_controller_new (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]