Ard Schrijvers pushed to branch release/5.0 at cms-community / hippo-cms

Commits:
beebbf33 by Ard Schrijvers at 2017-11-29T10:46:44+01:00
CMS-11002 Fix obvious NPE possibility

- - - - -


1 changed file:

- api/src/main/java/org/hippoecm/frontend/plugins/standards/tabs/TabsPlugin.java


Changes:

=====================================
api/src/main/java/org/hippoecm/frontend/plugins/standards/tabs/TabsPlugin.java
=====================================
--- 
a/api/src/main/java/org/hippoecm/frontend/plugins/standards/tabs/TabsPlugin.java
+++ 
b/api/src/main/java/org/hippoecm/frontend/plugins/standards/tabs/TabsPlugin.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2008-2016 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2008-2017 Hippo B.V. (http://www.onehippo.com)
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -568,12 +568,14 @@ public class TabsPlugin extends RenderPlugin {
         }
 
         public Component getIcon(String id, IconSize size) {
+            if (decorator == null) {
+                return null;
+            }
             Component icon = decorator.getIcon(id, size);
             if (icon != null) {
                 return icon;
             }
-
-            ResourceReference reference = decorator != null ? 
decorator.getIcon(size) : null;
+            ResourceReference reference = decorator.getIcon(size);
             return reference != null ? HippoIcon.fromResource(id, reference, 
size) : null;
         }
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/beebbf339420e7576a68175a282c3f2de62d9d3a

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/beebbf339420e7576a68175a282c3f2de62d9d3a
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to