Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Commit

Permalink
fix potential crash if OnSuspend is triggered before OnUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Contento committed Mar 27, 2013
1 parent c23eced commit 855e795
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kernel/app.monkey
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 855e795

Please sign in to comment.