From a91b20c897807e39c3e05bd5f49b8bba03bd2e70 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sat, 30 May 2009 19:37:41 +0300 Subject: ephy-shell.c: do not crash when loading about:blank ... --- src/ephy-shell.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ephy-shell.c b/src/ephy-shell.c index f957f3c47..f9f11387e 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 -- cgit v1.2.3