SimpleAudioDec: Fix crash in savestate load

This commit is contained in:
Henrik Rydgård 2024-07-20 00:00:29 +02:00
parent 5c26aa4c96
commit 091535744b

View file

@ -599,7 +599,7 @@ void AuCtx::DoState(PointerWrap &p) {
Do(p, Channels);
Do(p, MaxOutputSample);
Do(p, readPos);
int audioType = (int)decoder->GetAudioType();
int audioType = decoder ? (int)decoder->GetAudioType() : 0;
Do(p, audioType);
Do(p, BitRate);
Do(p, SamplingRate);