[gimp] Bug 722400 - GIMP segfaults when trying to save a modified, newly created image
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 722400 - GIMP segfaults when trying to save a modified, newly created image
- Date: Sat, 8 Feb 2014 09:20:27 +0000 (UTC)
commit aabd64e0701b96fbffd9dca2951e3bbe2292326a
Author: Michael Natterer <mitch gimp org>
Date: Sat Feb 8 10:18:29 2014 +0100
Bug 722400 - GIMP segfaults when trying to save a modified, newly created image
If for whatever reason making an uri from the documents folder fails,
return the uri of the home directory.
app/widgets/gimpfiledialog.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpfiledialog.c b/app/widgets/gimpfiledialog.c
index b03919d..49b8234 100644
--- a/app/widgets/gimpfiledialog.c
+++ b/app/widgets/gimpfiledialog.c
@@ -1162,6 +1162,17 @@ gimp_file_dialog_get_default_uri (Gimp *gimp)
uri = g_filename_to_uri (path, NULL, NULL);
g_free (path);
+ /* Paranoia fallback, see bug #722400 */
+ if (! uri)
+ {
+ path = g_build_path (G_DIR_SEPARATOR_S,
+ g_get_home_dir (),
+ G_DIR_SEPARATOR_S,
+ NULL);
+ uri = g_filename_to_uri (path, NULL, NULL);
+ g_free (path);
+ }
+
return uri;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]