diff options
| author | 2016-02-04 13:28:55 +0100 | |
|---|---|---|
| committer | 2016-02-04 13:34:09 +0100 | |
| commit | 23fd282121ea5c478fa45f3edc868309b85e25fc (patch) | |
| tree | f14644ff8819811d0861a590190cbbad188baa91 /src/emu/disound.cpp | |
| parent | 9e910e95a897a531fa6c7451885a477b31fad4b7 (diff) | |
disound: Don't crash on state load when the mixer is disabled by lack of inputs (misconfiguration or missing samples) [O. Galibert]
Diffstat (limited to 'src/emu/disound.cpp')
| -rw-r--r-- | src/emu/disound.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp index c1f4e49f4b6..7134b588963 100644 --- a/src/emu/disound.cpp +++ b/src/emu/disound.cpp @@ -443,7 +443,10 @@ void device_mixer_interface::interface_pre_start() void device_mixer_interface::interface_post_load() { - m_mixer_stream->set_sample_rate(device().machine().sample_rate()); + // Beware that there's not going to be a mixer stream if there was + // no inputs + if (m_mixer_stream) + m_mixer_stream->set_sample_rate(device().machine().sample_rate()); // call our parent device_sound_interface::interface_post_load(); |
