aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-05-31 00:37:41 +0800
committerXan Lopez <xan@gnome.org>2009-05-31 00:37:41 +0800
commita91b20c897807e39c3e05bd5f49b8bba03bd2e70 (patch)
tree6f1ae8799cfb75f18d119d643f152b2734e9f77e /src
parent3191345e4aafa9ae92c676468e588b6d1df2862c (diff)
downloadgsoc2013-epiphany-a91b20c897807e39c3e05bd5f49b8bba03bd2e70.tar
gsoc2013-epiphany-a91b20c897807e39c3e05bd5f49b8bba03bd2e70.tar.gz
gsoc2013-epiphany-a91b20c897807e39c3e05bd5f49b8bba03bd2e70.tar.bz2
gsoc2013-epiphany-a91b20c897807e39c3e05bd5f49b8bba03bd2e70.tar.lz
gsoc2013-epiphany-a91b20c897807e39c3e05bd5f49b8bba03bd2e70.tar.xz
gsoc2013-epiphany-a91b20c897807e39c3e05bd5f49b8bba03bd2e70.tar.zst
gsoc2013-epiphany-a91b20c897807e39c3e05bd5f49b8bba03bd2e70.zip
ephy-shell.c: do not crash when loading about:blank ...
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c11
1 files changed, 7 insertions, 4 deletions
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