diff --git a/cocos/audio/src/AudioDecoderWav.cpp b/cocos/audio/src/AudioDecoderWav.cpp index d89dcdbe3a..b1d7acb40b 100644 --- a/cocos/audio/src/AudioDecoderWav.cpp +++ b/cocos/audio/src/AudioDecoderWav.cpp @@ -132,13 +132,13 @@ namespace cocos2d { if (!IsEqualGUID(fmtInfo.ExtParams.SubFormat, WAV_SUBTYPE_PCM) && !IsEqualGUID(fmtInfo.ExtParams.SubFormat, WAV_SUBTYPE_IEEE_FLOAT)) { - fileStream = nullptr; + fileStream.reset(); return false; } break; default: ALOGW("The wav format %d doesn't supported currently!", (int)fmtInfo.AudioFormat); - fileStream = nullptr; + fileStream.reset(); assert(false); return false; }