From 6a524f7dfb9b8e4d4f3c4f0c0ef6bd1ce062b504 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 26 Feb 2005 22:48:16 +0000 Subject: Don't assert if we don't have a new embed in new_window callback. Part of 2005-02-26 Christian Persch * embed/mozilla/mozilla-embed-single.cpp: Don't assert if we don't have a new embed in new_window callback. Part of bug #165445. --- ChangeLog | 7 +++++++ embed/mozilla/mozilla-embed-single.cpp | 10 ++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a005bc2f..b48c749b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-02-26 Christian Persch + + * embed/mozilla/mozilla-embed-single.cpp: + + Don't assert if we don't have a new embed in new_window callback. + Part of bug #165445. + 2005-02-26 Christian Persch * src/bookmarks/ephy-bookmarks-import.c: (xbel_parse_folder): diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 961aced31..4d34511bf 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -334,11 +334,13 @@ mozilla_embed_single_new_window_orphan_cb (GtkMozEmbedSingle *moz_single, g_signal_emit_by_name (single, "new-window", NULL, mask, &new_embed); - g_assert (new_embed != NULL); - - gtk_moz_embed_set_chrome_mask (GTK_MOZ_EMBED (new_embed), chrome); + /* it's okay not to have a new embed */ + if (new_embed != NULL) + { + gtk_moz_embed_set_chrome_mask (GTK_MOZ_EMBED (new_embed), chrome); - *newEmbed = GTK_MOZ_EMBED (new_embed); + *newEmbed = GTK_MOZ_EMBED (new_embed); + } } static void -- cgit v1.2.3