diff options
| author | James Brown | 2002-05-12 10:18:40 +0000 |
|---|---|---|
| committer | James Brown | 2002-05-12 10:18:40 +0000 |
| commit | 3beabb6c19248ded4c3e09203f88cd7e71a34dc4 (patch) | |
| tree | d2cd821723c65a9af5a423beb66dc22a251c13f6 /sound | |
| parent | b9e335ef0fc1639bedc9a5f1482d7ad65d603ff2 (diff) | |
| download | scummvm-rg350-3beabb6c19248ded4c3e09203f88cd7e71a34dc4.tar.gz scummvm-rg350-3beabb6c19248ded4c3e09203f88cd7e71a34dc4.tar.bz2 scummvm-rg350-3beabb6c19248ded4c3e09203f88cd7e71a34dc4.zip | |
Fix crash if envvar not set.
svn-id: r4286
Diffstat (limited to 'sound')
| -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; } |
