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:
parent
57ceff19b9
commit
0e20faf896
1 changed files with 1 additions and 1 deletions
|
@ -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 ()
|
||||
|
|
Loading…
Reference in a new issue