Ard Schrijvers pushed to branch release/3.2 at cms-community / hippo-cms
Commits: 0e5d6717 by Ard Schrijvers at 2017-11-29T10:54:41+01:00 CMS-11004 [Backport 10.2.x] Fix obvious NPE possibility (cherry picked from commit f5ae5cf29bbe31333550a738427a83b2da426352) - - - - - 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-2015 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. @@ -516,12 +516,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/0e5d6717743460939af426efcff99cea61e158e1 --- View it on GitLab: https://code.onehippo.org/cms-community/hippo-cms/commit/0e5d6717743460939af426efcff99cea61e158e1 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