Fix NPE
authorKevin Lamonte <kevin.lamonte@gmail.com>
Tue, 21 Mar 2017 19:21:46 +0000 (15:21 -0400)
committerKevin Lamonte <kevin.lamonte@gmail.com>
Tue, 21 Mar 2017 19:21:46 +0000 (15:21 -0400)
src/jexer/io/SwingScreen.java

index 8da762af3158811c59427b5ab773a04ed9f1ed17..a70c8824b3cc82c5198a42d51342e0a160da67d9 100644 (file)
@@ -325,10 +325,12 @@ public final class SwingScreen extends Screen {
                 cursorStyle = CursorStyle.BLOCK;
             }
 
-            if (System.getProperty("jexer.Swing.tripleBuffer").
-                equals("false")) {
+            if (System.getProperty("jexer.Swing.tripleBuffer") != null) {
+                if (System.getProperty("jexer.Swing.tripleBuffer").
+                    equals("false")) {
 
-                SwingScreen.tripleBuffer = false;
+                    SwingScreen.tripleBuffer = false;
+                }
             }
 
             setTitle("Jexer Application");