aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJP Cimalando <jpcima@users.noreply.github.com>2018-04-22 11:34:01 +0200
committerJP Cimalando <jpcima@users.noreply.github.com>2018-04-22 11:34:01 +0200
commit369efe536ef43127efad27021bcb747e6bbc2449 (patch)
tree60bae22e52825784e8b1898053c34170d7215db5 /src
parent69066da551d7f11d70f2a9589f35dfd846d08dac (diff)
downloadlibADLMIDI-369efe536ef43127efad27021bcb747e6bbc2449.tar.gz
libADLMIDI-369efe536ef43127efad27021bcb747e6bbc2449.tar.bz2
libADLMIDI-369efe536ef43127efad27021bcb747e6bbc2449.zip
check LocationData for null on access of vibdelay
Diffstat (limited to 'src')
-rw-r--r--src/adlmidi_midiplay.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index 702ebea..88c1b39 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -1618,7 +1618,7 @@ void MIDIplay::NoteUpdate(uint16_t MidCh,
phase = ains.voice2_fine_tune;//0.125; // Detune the note slightly (this is what Doom does)
}
- if(Ch[MidCh].vibrato && d->vibdelay >= Ch[MidCh].vibdelay)
+ if(Ch[MidCh].vibrato && (!d || d->vibdelay >= Ch[MidCh].vibdelay))
bend += Ch[MidCh].vibrato * Ch[MidCh].vibdepth * std::sin(Ch[MidCh].vibpos);
#ifdef ADLMIDI_USE_DOSBOX_OPL