Fix crash if envvar not set.

svn-id: r4286
This commit is contained in:
James Brown
2002-05-12 10:18:40 +00:00
parent b9e335ef0f
commit 3beabb6c19
+2 -1
View File
@@ -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;
}