13
0

Fix crash on buffer override of N/A data-types

DiskReader::refill_audio and DR::run() do check if a given playlist
is available. This is required for upcoming changes to set
DR channels to unconditionally match DiskWriter.
This commit is contained in:
Robin Gareus 2020-02-20 01:17:23 +01:00
parent 28a37c6b9a
commit 52f88f6814
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -717,13 +717,13 @@ DiskReader::overwrite_existing_buffers ()
bool ret = true;
if (g_atomic_int_get (&_pending_overwrite) & (PlaylistModified|LoopDisabled|LoopChanged|PlaylistChanged)) {
if (!overwrite_existing_audio ()) {
if (_playlists[DataType::AUDIO] && !overwrite_existing_audio ()) {
ret = false;
}
}
if (g_atomic_int_get (&_pending_overwrite) & (PlaylistModified|PlaylistChanged)) {
if (!overwrite_existing_midi ()) {
if (_playlists[DataType::MIDI] && !overwrite_existing_midi ()) {
ret = false;
}
}