mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-02 19:56:13 +01:00
Fix #6320: Crash when CSS1.DAT is absent
This commit is contained in:
@@ -248,7 +248,8 @@ namespace OpenRCT2 { namespace Audio
|
||||
AudioFormat GetFormat() const override
|
||||
{
|
||||
AudioFormat result = { 0 };
|
||||
if (_source != nullptr)
|
||||
// The second check is there because NullAudioSource does not implement GetFormat. Avoid calling it.
|
||||
if (_source != nullptr && _source->GetLength() > 0)
|
||||
{
|
||||
result = _source->GetFormat();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user