Set mAudioTrack to null when AudioTrack initialization fails
authorGabriel Jacobo <gabomdq@gmail.com>
Wed, 31 Jul 2013 16:25:50 -0300
changeset 7555 93b540e4db8a
parent 7554 4b653ef6050d
child 7556 574f465da18a
Set mAudioTrack to null when AudioTrack initialization fails Prevents potential problems when stopping the app.
android-project/src/org/libsdl/app/SDLActivity.java
--- a/android-project/src/org/libsdl/app/SDLActivity.java	Wed Jul 31 12:13:26 2013 -0400
+++ b/android-project/src/org/libsdl/app/SDLActivity.java	Wed Jul 31 16:25:50 2013 -0300
@@ -473,6 +473,7 @@
         
         if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
             Log.e("SDL", "Failed during initialization of Audio Track");
+            mAudioTrack = null;
             return -1;
         }