Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/util/NodeBounds.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/util/NodeBounds.java b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/util/NodeBounds.java
index 637564910..87e80efa4 100644
--- a/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/util/NodeBounds.java
+++ b/org.eclipse.jubula.rc.javafx/src/org/eclipse/jubula/rc/javafx/util/NodeBounds.java
@@ -39,6 +39,12 @@ public class NodeBounds {
public static boolean checkIfContains(Point2D point, Node n) {
Point2D nodePos = n.localToScreen(0, 0);
+ // A null value here means that the Node is not in a Window, so its
+ // (non-existent) bounds cannot contain the given point.
+ if (nodePos == null) {
+ return false;
+ }
+
BoundingBox box = new BoundingBox(nodePos.getX(),
nodePos.getY(),
n.getBoundsInParent().getWidth(),

Back to the top