[gbrainy] Current game may be null, check for it
- From: Jordi Mas <jmas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gbrainy] Current game may be null, check for it
- Date: Sat, 24 Jul 2010 06:37:35 +0000 (UTC)
commit 12839e6900693ac06a1cc2f82508d46c06a6b340
Author: Jordi Mas <jmas softcatala org>
Date: Sat Jul 24 08:38:58 2010 +0200
Current game may be null, check for it
src/Core/Main/GameSession.cs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Main/GameSession.cs b/src/Core/Main/GameSession.cs
index 9557f70..050e727 100644
--- a/src/Core/Main/GameSession.cs
+++ b/src/Core/Main/GameSession.cs
@@ -260,14 +260,18 @@ namespace gbrainy.Core.Main
EnableTimer = false;
paused = true;
current_time = Catalog.GetString ("Paused");
- CurrentGame.EnableMouseEvents (false);
+
+ if (CurrentGame != null)
+ CurrentGame.EnableMouseEvents (false);
}
public void Resume ()
{
EnableTimer = true;
paused = false;
- CurrentGame.EnableMouseEvents (true);
+
+ if (CurrentGame != null)
+ CurrentGame.EnableMouseEvents (true);
}
public bool ScoreGame (string answer)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]