From 855e795053b4b2b265f25db87f929e47f149159a Mon Sep 17 00:00:00 2001 From: Michael Contento Date: Wed, 27 Mar 2013 19:53:12 +0100 Subject: [PATCH] fix potential crash if OnSuspend is triggered before OnUpdate --- src/kernel/app.monkey | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/app.monkey b/src/kernel/app.monkey index 3cf3adb..fef0338 100644 --- a/src/kernel/app.monkey +++ b/src/kernel/app.monkey @@ -95,7 +95,7 @@ Class App Extends app.App Abstract Method OnResume:Int() Try - timer.Play() + If timer Then timer.Play() If suspendable Then suspendable.OnResume() Catch ex:Exception Error ex @@ -105,7 +105,7 @@ Class App Extends app.App Abstract Method OnSuspend:Int() Try - timer.Pause() + If timer Then timer.Pause() If suspendable Then suspendable.OnSuspend() Catch ex:Exception Error ex