From 5b2f1a52a131d3377d3e2d8246aab468502ba7cf Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 7 Sep 2009 14:01:36 +0300 Subject: window-commands: also ref the embed while the stream is processed Since it also could go away meanwhile otherwise. --- src/window-commands.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/window-commands.c b/src/window-commands.c index a1898a6f9..8af9ef9d8 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -712,9 +712,10 @@ save_temp_source_replace_cb (GFile *file, GAsyncResult *result, EphyEmbed *embed g_strdup (webkit_web_view_get_uri (WEBKIT_WEB_VIEW (view))), g_free), - g_object_set_data (G_OBJECT (ostream), - "ephy-save-temp-source-embed", - embed); + g_object_set_data_full (G_OBJECT (ostream), + "ephy-save-temp-source-embed", + g_object_ref (embed), + g_object_unref); frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (view)); data_source = webkit_web_frame_get_data_source (frame); -- cgit v1.2.3