diff options
author | Xan Lopez <xan@gnome.org> | 2009-05-31 00:37:41 +0800 |
---|---|---|
committer | Xan Lopez <xan@gnome.org> | 2009-05-31 00:37:41 +0800 |
commit | a91b20c897807e39c3e05bd5f49b8bba03bd2e70 (patch) | |
tree | 6f1ae8799cfb75f18d119d643f152b2734e9f77e /src/ephy-shell.c | |
parent | 3191345e4aafa9ae92c676468e588b6d1df2862c (diff) | |
download | gsoc2013-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/ephy-shell.c')
-rw-r--r-- | 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 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 |