aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 87a293a5c..37a108d9b 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -667,6 +667,19 @@ ephy_window_delete_event_cb (GtkWidget *widget, GdkEvent *event, EphyWindow *win
GList *tabs, *l;
gboolean modified = FALSE;
+ /* Workaround a crash when closing a window while in print preview mode. See
+ * mozilla bug #241809
+ */
+ if (window->priv->mode == EPHY_WINDOW_MODE_PRINT_PREVIEW)
+ {
+ EphyEmbed *embed;
+
+ embed = ephy_window_get_active_embed (window);
+ ephy_embed_print_preview_close (embed);
+
+ ephy_window_set_print_preview (window, FALSE);
+ }
+
tabs = ephy_window_get_tabs (window);
for (l = tabs; l != NULL; l = l->next)
{