diff options
Diffstat (limited to 'sound/mididrv.cpp')
-rw-r--r-- | sound/mididrv.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 11c549b6af..0dc14f9558 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -386,7 +386,8 @@ int MidiDriver_SEQ::open(int mode) { error("Cannot open /dev/null to dump midi output"); } - _device_num = atoi(getenv("SCUMMVM_MIDIPORT")); + if (getenv("SCUMMVM_MIDIPORT")) + _device_num = atoi(getenv("SCUMMVM_MIDIPORT")); return 0; } |