aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r--src/ephy-shell.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 8e6b6c01e..21daf4fe5 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -517,17 +517,13 @@ ephy_shell_new_tab_full (EphyShell *shell,
}
else if (flags & EPHY_NEW_TAB_OPEN_PAGE)
{
- /* request can be NULL when trying to load about:blank */
- if (request)
- {
- ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
- webkit_network_request_get_uri (request),
- EPHY_WEB_VIEW_ADDRESS_EXPIRE_NEXT);
- ephy_web_view_load_request (EPHY_WEB_VIEW (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)),
- request);
- }
+ ephy_web_view_set_typed_address (EPHY_GET_EPHY_WEB_VIEW_FROM_EMBED (embed),
+ webkit_network_request_get_uri (request),
+ EPHY_WEB_VIEW_ADDRESS_EXPIRE_NEXT);
+ ephy_web_view_load_request (EPHY_WEB_VIEW (EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed)),
+ request);
- is_empty = !request || url_is_empty (webkit_network_request_get_uri (request));
+ is_empty = url_is_empty (webkit_network_request_get_uri (request));
}
/* Make sure the initial focus is somewhere sensible and not, for
@@ -579,9 +575,7 @@ ephy_shell_new_tab (EphyShell *shell,
embed = ephy_shell_new_tab_full (shell, parent_window,
previous_embed, request, flags,
EPHY_WEB_VIEW_CHROME_ALL, FALSE, 0);
-
- if (request)
- g_object_unref (request);
+ g_object_unref (request);
return embed;
}