[committed] NullPointerException from StandardGame.setUncaughtExceptionHandler

Hello,



I have stumbled upon a bug in jME2, which seems to have been reported before in http://www.jmonkeyengine.com/jmeforum/index.php?topic=6271.0 but lost in the forum. Basically, the following code in StandardGame:



public void setUncaughtExceptionHandler(UncaughtExceptionHandler exceptionHandler) {
  this.exceptionHandler = exceptionHandler;
  gameThread.setUncaughtExceptionHandler(this.exceptionHandler);
}



should test for gameThread being null as in:


public void setUncaughtExceptionHandler(UncaughtExceptionHandler exceptionHandler) {
  this.exceptionHandler = exceptionHandler;
  if (gameThread != null) {
    gameThread.setUncaughtExceptionHandler(this.exceptionHandler);
  }
}



otherwise, if you call this function before starting the thread (i.e., before calling StandardGame.start()) it will throw a NullPointerException.

Can someone apply this change?

--Miguel

If nobody complains, I can apply this change

fine with me