aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Jordan <[email protected]>2020-01-26 10:58:54 +1300
committerGitHub <[email protected]>2020-01-26 10:58:54 +1300
commita50f5639aa38bbcfcb47069e6baf8d0079047f83 (patch)
tree499c033b18021f9973ceb26b98fd7b6e52b71818
parent80bb7518daef2f30e9dcb7b5501a752593bf1884 (diff)
parenta69370750d2af8b22990be779640f3f42eca624d (diff)
Merge pull request #6 from philjord/revert-3-npe-fixdev1.7.0
Revert "fixed a NPE that happened during offscreen rendering"
-rw-r--r--src/main/java/org/jogamp/java3d/CanvasViewCache.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/org/jogamp/java3d/CanvasViewCache.java b/src/main/java/org/jogamp/java3d/CanvasViewCache.java
index 1532a81..1edb33e 100644
--- a/src/main/java/org/jogamp/java3d/CanvasViewCache.java
+++ b/src/main/java/org/jogamp/java3d/CanvasViewCache.java
@@ -589,11 +589,9 @@ class CanvasViewCache extends Object {
// 0.666x0.666 = 0.444 scaling. This is not a Java3D issue.
try {
final Graphics2D g2d = (Graphics2D) canvas.getGraphics();
- if (g2d != null) {
- final AffineTransform t = g2d.getTransform();
- hiDPIXScale = t.getScaleX();
- hiDPIYScale = t.getScaleY();
- }
+ final AffineTransform t = g2d.getTransform();
+ hiDPIXScale = t.getScaleX();
+ hiDPIYScale = t.getScaleY();
} catch (IllegalComponentStateException e) {}
metersPerPixelX = screenViewCache.metersPerPixelX;