From 85f4b824dcf1ff6ebb658ffd242eea2f9d8cd087 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 24 Jun 2013 06:17:46 +0200 Subject: Tests: Remove subsequent exceptions .. (not original issue, but annoying while analyzing) --- .../test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java | 4 +++- .../junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java | 4 +++- .../newt/event/TestNewtEventModifiersNewtCanvasSWTAWT.java | 10 +++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java index a847ca671..1504c948e 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersAWTCanvas.java @@ -85,7 +85,9 @@ public class TestNewtEventModifiersAWTCanvas extends BaseNewtEventModifiers { public static void afterClass() throws Exception { SwingUtilities.invokeAndWait(new Runnable() { public void run() { - _testFrame.dispose() ; + if( null != _testFrame ) { + _testFrame.dispose() ; + } } }) ; } diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java index 968d1af79..e0bc847a7 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasAWT.java @@ -98,7 +98,9 @@ public class TestNewtEventModifiersNewtCanvasAWT extends BaseNewtEventModifiers public static void afterClass() throws Exception { SwingUtilities.invokeAndWait( new Runnable() { public void run() { - _testFrame.dispose() ; + if( null != _testFrame ) { + _testFrame.dispose() ; + } } } ) ; diff --git a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWTAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWTAWT.java index cc32d5331..86e336e53 100644 --- a/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWTAWT.java +++ b/src/test/com/jogamp/opengl/test/junit/newt/event/TestNewtEventModifiersNewtCanvasSWTAWT.java @@ -146,9 +146,13 @@ public class TestNewtEventModifiersNewtCanvasSWTAWT extends BaseNewtEventModifie try { SWTAccessor.invoke(_display, true, new Runnable() { public void run() { - _composite.dispose(); - _shell.dispose(); - if(!_display.isDisposed()) { + if( null != _composite ) { + _composite.dispose(); + } + if( null != _shell ) { + _shell.dispose(); + } + if( null != _display && !_display.isDisposed()) { _display.dispose(); } }}); -- cgit v1.2.3