You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/11/01 00:34:18 UTC

[9/12] wp7 commit: fixes Media Api Xna exception

fixes Media Api Xna exception


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/949b3f00
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/949b3f00
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/949b3f00

Branch: refs/heads/master
Commit: 949b3f00f8156f76b5a576aac85a64d4ae297fca
Parents: 997d7cb
Author: sgrebnov <se...@gmail.com>
Authored: Tue Oct 16 15:20:00 2012 +0400
Committer: sgrebnov <se...@gmail.com>
Committed: Tue Oct 16 15:20:00 2012 +0400

----------------------------------------------------------------------
 .../standalone/cordovalib/Commands/AudioPlayer.cs  |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/949b3f00/templates/standalone/cordovalib/Commands/AudioPlayer.cs
----------------------------------------------------------------------
diff --git a/templates/standalone/cordovalib/Commands/AudioPlayer.cs b/templates/standalone/cordovalib/Commands/AudioPlayer.cs
index 83f178c..e57157a 100644
--- a/templates/standalone/cordovalib/Commands/AudioPlayer.cs
+++ b/templates/standalone/cordovalib/Commands/AudioPlayer.cs
@@ -622,8 +622,11 @@ namespace WP7CordovaClassLib.Cordova.Commands
         private void FinalizeXnaGameLoop()
         {
             // Timer to simulate the XNA game loop (Microphone is from XNA)
-            this.dtXna.Stop();
-            this.dtXna = null;
+            if (this.dtXna != null)
+            {
+                this.dtXna.Stop();
+                this.dtXna = null;
+            }
         }
 
         #endregion