From f244d36f76acff2739d7fc4b5b1e0936047d8646 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 13 Oct 2010 01:33:22 +0200 Subject: Drop to be enqueued NEWTEvent if EDT is already dead/stopped. Thx Steve for the threaddump --- src/newt/classes/com/jogamp/newt/impl/DisplayImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/newt/classes/com/jogamp') diff --git a/src/newt/classes/com/jogamp/newt/impl/DisplayImpl.java b/src/newt/classes/com/jogamp/newt/impl/DisplayImpl.java index eeb0b2504..0d9e295bd 100644 --- a/src/newt/classes/com/jogamp/newt/impl/DisplayImpl.java +++ b/src/newt/classes/com/jogamp/newt/impl/DisplayImpl.java @@ -346,6 +346,14 @@ public abstract class DisplayImpl extends Display { } public void enqueueEvent(boolean wait, NEWTEvent e) { + if(!isEDTRunning()) { + // oops .. we are already dead + if(DEBUG) { + Throwable t = new Throwable("EDT already stopped: wait:="+wait+", "+e); + t.printStackTrace(); + } + return; + } Object lock = new Object(); NEWTEventTask eTask = new NEWTEventTask(e, wait?lock:null); synchronized(lock) { -- cgit v1.2.3