[gimp/metadata-browser] Don't try to free raw values which are NULL.



commit d2bd4ca2c712adff2d1df70b7724d31410054147
Author: Roman Joost <roman bromeco de>
Date:   Sun Sep 25 21:27:36 2011 +1000

    Don't try to free raw values which are NULL.
    
    If only scalar values are set in a new XMPModel (e.g. from a widget),
    the raw values will be NULL.

 plug-ins/metadata/xmp-model.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/metadata/xmp-model.c b/plug-ins/metadata/xmp-model.c
index 0c9f89d..3a66de6 100644
--- a/plug-ins/metadata/xmp-model.c
+++ b/plug-ins/metadata/xmp-model.c
@@ -135,7 +135,8 @@ xmp_model_finalize (GObject *object)
                   gtk_tree_model_get (model, &child,
                                       COL_XMP_VALUE_RAW, &value_array,
                                       -1);
-                  if (value_array != last_value_array)
+                  if (value_array != last_value_array
+                      && value_array != NULL)
                     {
                       /* FIXME: this does not free everything */
                       for (i = 0; value_array[i] != NULL; i++)



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