test the correct obj for NULL and add some release logging for exceptional conditions

master
Aaron Culliney 2013-07-10 19:23:04 -07:00
parent 7de1c1778d
commit 46ad9cb7e1
1 changed files with 3 additions and 1 deletions

View File

@ -520,6 +520,7 @@ static ALCboolean opensles_reset_playback(ALCdevice *pDevice)
result = (*engineEngine)->CreateAudioPlayer(engineEngine, &devState->bqPlayerObject, &audioSrc, &audioSnk,
1, ids, req);
if ((result != SL_RESULT_SUCCESS) || (devState->bqPlayerObject == NULL)) {
RELEASE_LOG("create audio player is null or errored: %lx", result);
return ALC_FALSE;
}
@ -534,7 +535,8 @@ static ALCboolean opensles_reset_playback(ALCdevice *pDevice)
// get the buffer queue interface
result = (*devState->bqPlayerObject)->GetInterface(devState->bqPlayerObject, *pSL_IID_BUFFERQUEUE,
&devState->bqPlayerBufferQueue);
if ((result != SL_RESULT_SUCCESS) || (devState->bqPlayerObject == NULL)) {
if ((result != SL_RESULT_SUCCESS) || (devState->bqPlayerBufferQueue == NULL)) {
RELEASE_LOG("get the buffer queue interface is null or errored: %lx", result);
return ALC_FALSE;
}