aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2009-09-07 19:01:36 +0800
committerXan Lopez <xan@gnome.org>2009-09-07 19:01:36 +0800
commit5b2f1a52a131d3377d3e2d8246aab468502ba7cf (patch)
tree50a39d803afa0548e764974e6717610823aa16d5
parent38acd37212cf2636468cfbec151bf7a2b4d2d535 (diff)
downloadgsoc2013-epiphany-5b2f1a52a131d3377d3e2d8246aab468502ba7cf.tar
gsoc2013-epiphany-5b2f1a52a131d3377d3e2d8246aab468502ba7cf.tar.gz
gsoc2013-epiphany-5b2f1a52a131d3377d3e2d8246aab468502ba7cf.tar.bz2
gsoc2013-epiphany-5b2f1a52a131d3377d3e2d8246aab468502ba7cf.tar.lz
gsoc2013-epiphany-5b2f1a52a131d3377d3e2d8246aab468502ba7cf.tar.xz
gsoc2013-epiphany-5b2f1a52a131d3377d3e2d8246aab468502ba7cf.tar.zst
gsoc2013-epiphany-5b2f1a52a131d3377d3e2d8246aab468502ba7cf.zip
window-commands: also ref the embed while the stream is processed
Since it also could go away meanwhile otherwise.
-rw-r--r--src/window-commands.c7
1 files 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);