Fixed segfault when writing to MIDI file.
This commit is contained in:
parent
dfae141275
commit
d75a04b48d
@ -261,9 +261,9 @@ sound
|
||||
mode
|
||||
sb16
|
||||
enabled
|
||||
midifile
|
||||
wavefile
|
||||
logfile
|
||||
midi
|
||||
wave
|
||||
log
|
||||
midimode
|
||||
wavemode
|
||||
loglevel
|
||||
|
@ -3075,10 +3075,10 @@ void bx_sb16_c::writemidicommand(int command, int length, Bit8u data[])
|
||||
return;
|
||||
} else if ((BX_SB16_THIS midimode == 2) ||
|
||||
(BX_SB16_THIS midimode == 3)) {
|
||||
MIDIDATA = fopen(SIM->get_param_string("midifile", base)->getptr(),"wb");
|
||||
MIDIDATA = fopen(SIM->get_param_string("midi", base)->getptr(),"wb");
|
||||
if (MIDIDATA == NULL) {
|
||||
writelog (MIDILOG(2), "Error opening file %s. Midimode disabled.",
|
||||
SIM->get_param_string("midifile", base)->getptr());
|
||||
SIM->get_param_string("midi", base)->getptr());
|
||||
BX_SB16_THIS midimode = 0;
|
||||
} else if (BX_SB16_THIS midimode == 2) {
|
||||
initmidifile();
|
||||
|
Loading…
Reference in New Issue
Block a user