From 14da95092f22298f66ad8e8cbd03eb0aae4b1695 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 28 Sep 2011 17:22:39 +0200 Subject: NEWT DisplayImpl: Check for null event in task --- src/newt/classes/jogamp/newt/DisplayImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java index cfe9f0c2d..2d251614b 100644 --- a/src/newt/classes/jogamp/newt/DisplayImpl.java +++ b/src/newt/classes/jogamp/newt/DisplayImpl.java @@ -353,6 +353,12 @@ public abstract class DisplayImpl extends Display { final void dispatchMessage(final NEWTEventTask eventTask) { NEWTEvent event = eventTask.get(); + if(null == event) { + // Ooops ? + System.err.println("Warning: event of eventTask is NULL"); + Thread.dumpStack(); + return; + } Object source = event.getSource(); if(source instanceof NEWTEventConsumer) { NEWTEventConsumer consumer = (NEWTEventConsumer) source ; -- cgit v1.2.3