Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Set mAudioTrack to null when AudioTrack initialization fails
Browse files Browse the repository at this point in the history
Prevents potential problems when stopping the app.
  • Loading branch information
gabomdq committed Jul 31, 2013
1 parent c9fcaea commit 7e90aff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -473,6 +473,7 @@ public static int audioInit(int sampleRate, boolean is16Bit, boolean isStereo, i

if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
Log.e("SDL", "Failed during initialization of Audio Track");
mAudioTrack = null;
return -1;
}

Expand Down

0 comments on commit 7e90aff

Please sign in to comment.