summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java b/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java
index 4d5d9724a..af5590be6 100644
--- a/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java
+++ b/src/newt/classes/jogamp/newt/swt/SWTEDTUtil.java
@@ -83,9 +83,18 @@ public class SWTEDTUtil implements EDTUtil {
synchronized(edtLock) {
if( nedt.isRunning() ) {
final Thread curT = Thread.currentThread();
- final Thread swtT = !swtDisposed ? swtDisplay.getThread() : null;
+ final String swtTName;
+ final Thread swtT;
+ if( !swtDisposed ) {
+ swtT = swtDisplay.getThread();
+ swtTName = swtT.getName();
+ } else {
+ swtT = null;
+ swtTName = null;
+ }
final boolean onSWTEDT = swtT == curT;
- throw new IllegalStateException("EDT still running and not subject to stop. Curr "+curT.getName()+", NEDT "+nedt.getName()+", isRunning "+nedt.isRunning+", shouldStop "+nedt.shouldStop+", SWT-EDT "+swtT.getName()+", on SWT-EDT "+onSWTEDT);
+ throw new IllegalStateException("EDT still running and not subject to stop. Curr "+curT.getName()+
+ ", NEDT "+nedt.getName()+", isRunning "+nedt.isRunning+", shouldStop "+nedt.shouldStop+", SWT-EDT "+swtTName+", on SWT-EDT "+onSWTEDT);
}
if(DEBUG) {
System.err.println(Thread.currentThread()+": SWT-EDT reset - edt: "+nedt+", swtDisposed (skipping) "+swtDisposed);