This is simple fix for the NPE. The second test is a realistic case on how this can happen accidentally, as that originally happened to me
--------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Fix NPE for anchor with no scene Changes: https://git.openjdk.org/jfx/pull/2321/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2321&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8392968 Stats: 27 lines in 2 files changed: 25 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jfx/pull/2321.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2321/head:pull/2321 PR: https://git.openjdk.org/jfx/pull/2321
