[evince] ev-window: Don't crash when trying to save a copy



commit 3850ff531e02260083ca0da55267d4007d0d9d83
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Apr 3 13:43:54 2014 +0200

    ev-window: Don't crash when trying to save a copy
    
    We can not free both folder_uri and parent_uri. If parent_uri is
    non-NULL then it will point to the same location as folder_uri.
    Also, parent_uri is now unused so we can just remove it.
    
    Fallout from 41ce0e16cc3f395766abb239f990dd98c3144001
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727536

 shell/ev-window.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 1ee54c7..420e7c8 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -2430,7 +2430,6 @@ ev_window_file_chooser_restore_folder (EvWindow       *window,
 {
         const gchar *dir;
         gchar *folder_uri;
-        gchar *parent_uri = NULL;
 
         g_settings_get (ev_window_ensure_settings (window),
                         get_settings_key_for_directory (directory),
@@ -2442,7 +2441,7 @@ ev_window_file_chooser_restore_folder (EvWindow       *window,
                 parent = g_file_get_parent (file);
                 g_object_unref (file);
                 if (parent) {
-                        folder_uri = parent_uri = g_file_get_uri (parent);
+                        folder_uri = g_file_get_uri (parent);
                         g_object_unref (parent);
                 }
         }
@@ -2456,7 +2455,6 @@ ev_window_file_chooser_restore_folder (EvWindow       *window,
         }
 
         g_free (folder_uri);
-        g_free (parent_uri);
 }
 
 static void


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