aboutsummaryrefslogtreecommitdiff
path: root/sound/mididrv.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2010-06-22 18:27:00 +0000
committerFlorian Kagerer2010-06-22 18:27:00 +0000
commit78fb62bcdf8c54a4c6024aa160641f6a196ebcf4 (patch)
tree3dbe895b30560ee31bbde16bd42801185bc7e9eb /sound/mididrv.cpp
parent3a394793b6ef84d3bf200c7aac276ac39f8dc36f (diff)
downloadscummvm-rg350-78fb62bcdf8c54a4c6024aa160641f6a196ebcf4.tar.gz
scummvm-rg350-78fb62bcdf8c54a4c6024aa160641f6a196ebcf4.tar.bz2
scummvm-rg350-78fb62bcdf8c54a4c6024aa160641f6a196ebcf4.zip
LAUNCHER: hopefully fixed music driver selection via command line
svn-id: r50158
Diffstat (limited to 'sound/mididrv.cpp')
-rw-r--r--sound/mididrv.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 4faff04d9c..d185626f62 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -238,6 +238,10 @@ MidiDriver *MidiDriver::createMidi(MidiDriver::DeviceHandle handle) {
MidiDriver::DeviceHandle MidiDriver::getDeviceHandle(const Common::String &identifier) {
const MusicPlugin::List p = MusicMan.getPlugins();
+
+ if (p.begin() == p.end())
+ error("Music plugins must be loaded prior to calling this method.");
+
for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end(); m++) {
MusicDevices i = (**m)->getDevices();
for (MusicDevices::iterator d = i.begin(); d != i.end(); d++) {