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.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index c5c71abac..c9eee946b 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -636,13 +636,15 @@ ephy_shell_new_tab_full (EphyShell *shell,
window = ephy_window_new_with_chrome (chrome, is_popup);
}
- if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL) {
- nb = ephy_window_get_notebook (window);
- /* FIXME this assumes the tab is the direct notebook child */
- position = gtk_notebook_page_num (GTK_NOTEBOOK (nb),
- GTK_WIDGET (previous_embed)) + 1;
- } else
- g_warning ("Requested to append new tab after parent, but 'previous_embed' was NULL");
+ if (flags & EPHY_NEW_TAB_APPEND_AFTER) {
+ if (previous_embed) {
+ nb = ephy_window_get_notebook (window);
+ /* FIXME this assumes the tab is the direct notebook child */
+ position = gtk_notebook_page_num (GTK_NOTEBOOK (nb),
+ GTK_WIDGET (previous_embed)) + 1;
+ } else
+ g_warning ("Requested to append new tab after parent, but 'previous_embed' was NULL");
+ }
if (flags & EPHY_NEW_TAB_FROM_EXTERNAL) {
/* If the active embed is blank, us e that to open the url and jump to it */