From 21c195f175176781065124e676c5e6654825ee76 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sat, 9 Feb 2013 18:11:22 +0100 Subject: ephy-shell: add g_return_val_if_fails to ephy_shell_new_tab_full --- src/ephy-shell.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 85a92eb83..7fd01d7de 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -736,6 +736,15 @@ ephy_shell_new_tab_full (EphyShell *shell, gboolean is_empty = FALSE; int position = -1; + g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL); + g_return_val_if_fail (EPHY_IS_WINDOW (parent_window) || !parent_window, NULL); + g_return_val_if_fail (EPHY_IS_EMBED (previous_embed) || !previous_embed, NULL); +#ifdef HAVE_WEBKIT2 + g_return_val_if_fail (WEBKIT_IS_URI_REQUEST (request) || !request, NULL); +#else + g_return_val_if_fail (WEBKIT_IS_NETWORK_REQUEST (request) || !request, NULL); +#endif + embed_shell = EPHY_EMBED_SHELL (shell); if (flags & EPHY_NEW_TAB_OPEN_PAGE) open_page = TRUE; -- cgit v1.2.3