Android- fix a crash when the game view is closed before it started running

When the game view is closed, if it hasn’t started running yet the
stopwatch would still be null- added a null check.
This commit is contained in:
Tzach Shabtay 2016-12-11 17:50:38 -05:00
parent 57ceff19b9
commit 0e20faf896

View file

@ -457,7 +457,7 @@ namespace OpenTK.Platform.Android
// if the render thread is paused, let it run so it exits
pauseSignal.Set ();
stopWatch.Stop ();
if (stopWatch != null) stopWatch.Stop ();
}
void PauseThread ()