cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [1/2] git commit: null check for player
Date Wed, 19 Jun 2013 23:30:14 GMT
Updated Branches:
  refs/heads/master 4e05ba99f -> 7d3b04a29


null check for player


Project: http://git-wip-us.apache.org/repos/asf/cordova-wp8/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-wp8/commit/1d6a69c8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-wp8/tree/1d6a69c8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-wp8/diff/1d6a69c8

Branch: refs/heads/master
Commit: 1d6a69c8295b9db48566803ccaa579ebc6e30252
Parents: 4e05ba9
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Wed Jun 19 16:12:19 2013 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Wed Jun 19 16:12:19 2013 -0700

----------------------------------------------------------------------
 common/Plugins/AudioPlayer.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-wp8/blob/1d6a69c8/common/Plugins/AudioPlayer.cs
----------------------------------------------------------------------
diff --git a/common/Plugins/AudioPlayer.cs b/common/Plugins/AudioPlayer.cs
index a83be5b..cc65939 100644
--- a/common/Plugins/AudioPlayer.cs
+++ b/common/Plugins/AudioPlayer.cs
@@ -410,7 +410,10 @@ namespace WPCordovaClassLib.Cordova.Commands
         /// </summary>
         private void MediaFailed(object sender, RoutedEventArgs arg)
         {
-            player.Stop();
+            if (player != null)
+            {
+                player.Stop();
+            }
             InvokeCallback(MediaError, MediaErrorStartingPlayback, false);
             //this.handler.InvokeCustomScript(new ScriptCallback(CallbackFunction, this.id,
MediaError.ToString(), "Media failed"),false);
         }


Mime
View raw message