[epiphany] ephy-shell.c: do not crash when loading about:blank ...



commit a91b20c897807e39c3e05bd5f49b8bba03bd2e70
Author: Xan Lopez <xan gnome org>
Date:   Sat May 30 19:37:41 2009 +0300

    ephy-shell.c: do not crash when loading about:blank ...
---
 src/ephy-shell.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index f957f3c..f9f1138 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -518,11 +518,14 @@ ephy_shell_new_tab_full (EphyShell *shell,
 	}
 	else if (flags & EPHY_NEW_TAB_OPEN_PAGE)
 	{
-		g_assert (request != NULL);
+		/* request can be NULL when trying to load about:blank */
+		if (request)
+		{
+			ephy_web_view_load_request (EPHY_WEB_VIEW (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)),
+						    request);
+		}
 
-		ephy_web_view_load_request (EPHY_WEB_VIEW (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)),
-					    request);
-		is_empty = url_is_empty (webkit_network_request_get_uri (request));
+		is_empty = !request || url_is_empty (webkit_network_request_get_uri (request));
 	}
 
         /* Make sure the initial focus is somewhere sensible and not, for



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