[gimp] app: Allow myb files with missing icons



commit 17da79ef28aec513a4e464f882fb8f5d80ff68fd
Author: Daniel Sabo <DanielSabo gmail com>
Date:   Sat Jan 2 15:12:52 2016 -0800

    app: Allow myb files with missing icons

 app/core/gimpmybrush-load.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimpmybrush-load.c b/app/core/gimpmybrush-load.c
index 3299528..9d8a4c9 100644
--- a/app/core/gimpmybrush-load.c
+++ b/app/core/gimpmybrush-load.c
@@ -107,13 +107,6 @@ gimp_mybrush_load (GimpContext   *context,
                                              48, 48, error);
   g_free (preview_filename);
 
-  if (! pixbuf)
-    {
-      mypaint_brush_unref (mypaint_brush);
-      g_free (buffer);
-      return NULL;
-    }
-
   basename = g_path_get_basename (gimp_file_get_utf8_name (file));
 
   basename[strlen (basename) - 4] = '\0';
@@ -128,7 +121,9 @@ gimp_mybrush_load (GimpContext   *context,
                         NULL);
 
   g_free (basename);
-  g_object_unref (pixbuf);
+
+  if (pixbuf)
+    g_object_unref (pixbuf);
 
   brush->priv->brush_json = (gchar *) buffer;
 


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