From 0e20faf8966ac7b3a0297a42e3c64b55d6240e27 Mon Sep 17 00:00:00 2001 From: Tzach Shabtay Date: Sun, 11 Dec 2016 17:50:38 -0500 Subject: [PATCH] Android- fix a crash when the game view is closed before it started running MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When the game view is closed, if it hasn’t started running yet the stopwatch would still be null- added a null check. --- src/OpenTK/Platform/Android/AndroidGameView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenTK/Platform/Android/AndroidGameView.cs b/src/OpenTK/Platform/Android/AndroidGameView.cs index cb438b6..6d6d01e 100644 --- a/src/OpenTK/Platform/Android/AndroidGameView.cs +++ b/src/OpenTK/Platform/Android/AndroidGameView.cs @@ -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 () -- 2.7.4