Set mAudioTrack to null when AudioTrack initialization fails
authorGabriel Jacobo <gabomdq@gmail.com>
Wed, 31 Jul 2013 16:25:50 -0300
changeset 755593b540e4db8a
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
     1.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Wed Jul 31 12:13:26 2013 -0400
     1.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Wed Jul 31 16:25:50 2013 -0300
     1.3 @@ -473,6 +473,7 @@
     1.4          
     1.5          if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
     1.6              Log.e("SDL", "Failed during initialization of Audio Track");
     1.7 +            mAudioTrack = null;
     1.8              return -1;
     1.9          }
    1.10