[epiphany] window-commands: better strdup the URI webkit gives us



commit 38acd37212cf2636468cfbec151bf7a2b4d2d535
Author: Xan Lopez <xan gnome org>
Date:   Mon Sep 7 13:42:04 2009 +0300

    window-commands: better strdup the URI webkit gives us
    
    Since it's owned by the view, which might be dead by the time we
    fallback to viewing the source in another tab.

 src/window-commands.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/window-commands.c b/src/window-commands.c
index 77bb616..a1898a6 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -707,9 +707,10 @@ save_temp_source_replace_cb (GFile *file, GAsyncResult *result, EphyEmbed *embed
 
 	view = ephy_embed_get_web_view (embed);
 
-	g_object_set_data (G_OBJECT (ostream),
-			   "ephy-original-source-uri",
-			   (gpointer)webkit_web_view_get_uri (WEBKIT_WEB_VIEW (view)));
+	g_object_set_data_full (G_OBJECT (ostream),
+				"ephy-original-source-uri",
+				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",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]