Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZeb Ford-Reitz2014-03-06 09:58:11 +0000
committerZeb Ford-Reitz2014-03-06 09:58:11 +0000
commitf5567c6bec3238cdffa72a5a1bcc7f8a00dd4fd3 (patch)
tree38434b642f9fe0ab0ef18af7ffe1fd03cc2e2a0b
parent2fb28d1e2180613682ec30828a48f4aed335d8c1 (diff)
downloadorg.eclipse.jubula.core-f5567c6bec3238cdffa72a5a1bcc7f8a00dd4fd3.tar.gz
org.eclipse.jubula.core-f5567c6bec3238cdffa72a5a1bcc7f8a00dd4fd3.tar.xz
org.eclipse.jubula.core-f5567c6bec3238cdffa72a5a1bcc7f8a00dd4fd3.zip
https://bugs.eclipse.org/bugs/show_bug.cgi?id=428993
JavaFX toolkit - object mapping stops working after changing the page Adds null-check for Nodes that no longer belong to a Window.
-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