[gimp/gimp-2-8] Bug 724338: free the GimpImageFile's icon when its contents is updated.



commit 6c9a04e1030bc3efc537ff16d5291f3207fd0672
Author: Jehan <jehan girinstud io>
Date:   Fri Feb 14 15:50:56 2014 +1300

    Bug 724338: free the GimpImageFile's icon when its contents is updated.
    
    The main consequence was that file icons were stuck to the first
    filetype's icon selected in file dialogs.
    (cherry picked from commit 6af7f47238a55a09b63c601fec5bda77cf2ab5d3)

 app/core/gimpimagefile.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpimagefile.c b/app/core/gimpimagefile.c
index 34ef7c8..4ef4f21 100644
--- a/app/core/gimpimagefile.c
+++ b/app/core/gimpimagefile.c
@@ -562,6 +562,11 @@ gimp_imagefile_info_changed (GimpImagefile *imagefile)
 
       private->description = NULL;
     }
+  if (private->icon)
+    {
+      g_object_unref (GET_PRIVATE (imagefile)->icon);
+      private->icon = NULL;
+    }
 
   g_signal_emit (imagefile, gimp_imagefile_signals[INFO_CHANGED], 0);
 }


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