summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorpag <gabi.antal88@gmail.com>2015-10-10 17:05:37 +0200
committerVaadin Code Review <review@vaadin.com>2015-10-19 17:47:07 +0000
commit6539cb439f36c77aaa9cb80e6e0fc683f145a060 (patch)
tree67c1bae78c74b8a58780e1b47cda3b1d1c669190 /client
parent2333da589320f216cf77b0e1562403c1e72c4222 (diff)
downloadvaadin-framework-6539cb439f36c77aaa9cb80e6e0fc683f145a060.tar.gz
vaadin-framework-6539cb439f36c77aaa9cb80e6e0fc683f145a060.zip
VTree$TreeNode avoid NPE triggered by external ONLOAD events (#18563)
If an ONLOAD event fires but the target is not the icon, an NPE occurs. The isCaptionElement method has already used the check against null before any call happens on the icon which logic is enough for the onBrowserEvent check as well. Change-Id: I64de45a07f50f113dcfcb4556f0d8adeea9e1b1b
Diffstat (limited to 'client')
-rw-r--r--client/src/com/vaadin/client/ui/VTree.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/VTree.java b/client/src/com/vaadin/client/ui/VTree.java
index 8fcb01e5d5..efbafd0cb7 100644
--- a/client/src/com/vaadin/client/ui/VTree.java
+++ b/client/src/com/vaadin/client/ui/VTree.java
@@ -710,7 +710,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
final int type = DOM.eventGetType(event);
final Element target = DOM.eventGetTarget(event);
- if (type == Event.ONLOAD && target == icon.getElement()) {
+ if (type == Event.ONLOAD && icon != null && target == icon.getElement()) {
iconLoaded.trigger();
}