[epiphany/gnome-3-0] Only unset the value after we are done with the string for 'Save Link As...'



commit 5112696e8bcd857e3a9278b8fc9bbe59891bbfab
Author: Gustavo Noronha Silva <gns gnome org>
Date:   Sun Apr 17 14:48:28 2011 -0300

    Only unset the value after we are done with the string for 'Save Link As...'
    
    We get the string from the GValue without making a copy, so we cannot
    unset it before we are done using the string, otherwise we may end up
    with our string pointing to garbage.
    
    Bug #646724

 src/popup-commands.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/popup-commands.c b/src/popup-commands.c
index 005a39d..e7064f1 100644
--- a/src/popup-commands.c
+++ b/src/popup-commands.c
@@ -222,7 +222,6 @@ save_property_url (GtkAction *action,
 
 	download = ephy_download_new_for_uri (location);
 	ephy_download_set_window (download, GTK_WIDGET (window));
-	g_value_unset (&value);
 
 	if (ask_dest)
 	{
@@ -250,6 +249,8 @@ save_property_url (GtkAction *action,
 		ephy_download_set_auto_destination (download);
 		ephy_download_start (download);
 	}
+
+	g_value_unset (&value);
 }
 
 void



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