Don't crash from a NULL device.

master
Ian Fischer 2013-07-17 22:12:54 -07:00
parent 46ad9cb7e1
commit 9658f0dc27
1 changed files with 4 additions and 0 deletions

View File

@ -484,6 +484,10 @@ static void opensles_close_playback(ALCdevice *pDevice)
static ALCboolean opensles_reset_playback(ALCdevice *pDevice)
{
if (pDevice == NULL) {
LOGE("Received a NULL ALCdevice! Returning ALC_FALSE from opensles_reset_playback");
return ALC_FALSE;
}
LOGV("opensles_reset_playback pDevice=%p", pDevice);
opesles_data_t *devState;
unsigned bits = BytesFromDevFmt(pDevice->FmtType) * 8;