[gimp] app: paranoia: ref file_save()'s GFile during save, see previous commit



commit f8848f06fde5a07632f5ce13bccb6115221d9b79
Author: Michael Natterer <mitch gimp org>
Date:   Sun Jul 13 15:08:45 2014 +0200

    app: paranoia: ref file_save()'s GFile during save, see previous commit

 app/file/file-save.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/app/file/file-save.c b/app/file/file-save.c
index 1697082..a710c3c 100644
--- a/app/file/file-save.c
+++ b/app/file/file-save.c
@@ -86,8 +86,9 @@ file_save (Gimp                *gimp,
   g_return_val_if_fail (error == NULL || *error == NULL,
                         GIMP_PDB_CALLING_ERROR);
 
-  /* ref the image, so it can't get deleted during save */
+  /*  ref image and file, so they can't get deleted during save  */
   g_object_ref (image);
+  g_object_ref (file);
 
   drawable = gimp_image_get_active_drawable (image);
 
@@ -273,6 +274,7 @@ file_save (Gimp                *gimp,
   gimp_image_flush (image);
 
  out:
+  g_object_unref (file);
   g_object_unref (image);
 
   g_free (path);


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