evince/0001-ev-window-Don-t-crash-when-trying-to-save-a-copy.patch
2014-04-14 14:46:25 +02:00

49 lines
1.6 KiB
Diff

From 5ab6037b0f0d875b11ad1237b33a35223c3a8220 Mon Sep 17 00:00:00 2001
From: Debarshi Ray <debarshir@gnome.org>
Date: Thu, 3 Apr 2014 13:43:54 +0200
Subject: [PATCH] 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 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 978c55f..faa8045 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -2428,7 +2428,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),
@@ -2440,7 +2439,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);
}
}
@@ -2454,7 +2453,6 @@ ev_window_file_chooser_restore_folder (EvWindow *window,
}
g_free (folder_uri);
- g_free (parent_uri);
}
static void
--
1.9.0