This PR solves potential NPE in `D3DResourceFactory.createPresentable`. The mistake was quite obvious, creating an RTT can potentially return `null` due to lack of resources available in the system. If that happens while dirty opts are enabled, `rtt` would be dereferenced by calling `rtt.contentsUseful()`.
The fix is to move the check to after we check if `rtt` is null. ------------- Commit messages: - Guard rtt from NPE in createPresentable Changes: https://git.openjdk.org/jfx/pull/1987/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1987&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8372275 Stats: 10 lines in 1 file changed: 5 ins; 5 del; 0 mod Patch: https://git.openjdk.org/jfx/pull/1987.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/1987/head:pull/1987 PR: https://git.openjdk.org/jfx/pull/1987
