[epiphany] ephy-window: do not assume there's always a location entry



commit 61b4a15531501833926b33a77f0416efc772a897
Author: Xan Lopez <xlopez igalia com>
Date:   Tue Jun 28 23:03:17 2011 +0200

    ephy-window: do not assume there's always a location entry
    
    It won't be the case in web app mode.

 src/ephy-window.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index cd03516..67bd63e 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1713,6 +1713,7 @@ sync_tab_load_progress (EphyWebView *view, GParamSpec *pspec, EphyWindow *window
 	gboolean switching_tab = pspec == NULL;
 
 	if (window->priv->closing) return;
+	if (!window->priv->entry) return;
 
 	if (window->priv->clear_progress_timeout_id)
 	{
@@ -3831,10 +3832,13 @@ ephy_window_constructor (GType type,
 	action = gtk_action_group_get_action (toolbar_action_group,
 					      "Location");
 	proxies = gtk_action_get_proxies (action);
-	proxy = GTK_WIDGET (proxies->data);
-	priv->entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (proxy));
-	gtk_window_set_application (GTK_WINDOW (window),
+	if (proxies)
+	{
+		proxy = GTK_WIDGET (proxies->data);
+		priv->entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (proxy));
+		gtk_window_set_application (GTK_WINDOW (window),
 				    GTK_APPLICATION (ephy_shell_get_application (ephy_shell_get_default ())));
+	}
 	
 	return object;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]