Index: ephy-shell.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-shell.c,v
retrieving revision 1.38
diff -u -p -r1.38 ephy-shell.c
--- ephy-shell.c	21 May 2003 11:15:51 -0000	1.38
+++ ephy-shell.c	25 May 2003 14:31:40 -0000
@@ -545,17 +553,18 @@ ephy_shell_new_tab (EphyShell *shell,
 
 		g_free (homepage);
 	}
-	else if (flags & EPHY_NEW_TAB_NEW_PAGE)
+	else if ((flags & EPHY_NEW_TAB_NEW_PAGE) && previous_embed)
 	{
 		ephy_embed_load_url (embed, "about:blank");
 		ephy_embed_copy_page (embed, previous_embed, DISPLAY_NORMAL);
+		ephy_embed_shistory_copy (previous_embed, embed);
 	}
 	else if (flags & EPHY_NEW_TAB_OPEN_PAGE)
 	{
 		g_assert (url != NULL);
 		ephy_embed_load_url (embed, url);
 	}
-	else if (flags & EPHY_NEW_TAB_CLONE_PAGE)
+	else if ((flags & EPHY_NEW_TAB_CLONE_PAGE) && previous_embed)
 	{
 		EmbedDisplayType display_type;
 
@@ -564,6 +573,7 @@ ephy_shell_new_tab (EphyShell *shell,
 
 		ephy_embed_load_url (embed, "about:blank");
 		ephy_embed_copy_page (embed, previous_embed, display_type);
+		ephy_embed_shistory_copy (previous_embed, embed);
 	}
 
 	if (flags & EPHY_NEW_TAB_FULLSCREEN_MODE)
