[gimp] app: don't allow a GimpViewable's compat stock-id to be set to NULL



commit 6873b130a9106d637c9b93694420130c09d5d343
Author: Michael Natterer <mitch gimp org>
Date:   Thu May 8 22:31:36 2014 +0200

    app: don't allow a GimpViewable's compat stock-id to be set to NULL
    
    The only purpose of keeping that property around is to load old
    config files, and these can never contain NULL stock-ids.

 app/core/gimpviewable.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpviewable.c b/app/core/gimpviewable.c
index 46c92cc..1e76261 100644
--- a/app/core/gimpviewable.c
+++ b/app/core/gimpviewable.c
@@ -263,6 +263,8 @@ gimp_viewable_set_property (GObject      *object,
   switch (property_id)
     {
     case PROP_STOCK_ID:
+      if (! g_value_get_string (value))
+        break;
     case PROP_ICON_NAME:
       gimp_viewable_set_icon_name (viewable, g_value_get_string (value));
       break;


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