diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 595b1f6f63..abde4d2937 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -18,6 +18,7 @@ - Fix: [#6193] All rings in Space Rings use the same secondary colour - Fix: [#6198] You cannot cancel RCT1 directory selection - Fix: [#6271] Wrong booster speed tooltip text +- Fix: [#6320] Crash when CSS1.DAT is absent - Fix: Infinite loop when removing scenery elements with >127 base height. - Fix: Ghosting of transparent map elements when the viewport is moved in OpenGL mode. - Improved: [#6186] Transparent menu items now draw properly in OpenGL mode. diff --git a/src/openrct2-ui/audio/AudioChannel.cpp b/src/openrct2-ui/audio/AudioChannel.cpp index 50a63cdb65..92dba6358e 100644 --- a/src/openrct2-ui/audio/AudioChannel.cpp +++ b/src/openrct2-ui/audio/AudioChannel.cpp @@ -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(); }