cwIoMidiRecordPlay.cpp : Change the location where p->ioH is initialized in create() to guarantee that it is valid in _destroy().
This commit is contained in:
parent
cb192f32cb
commit
0d644c9281
@ -1298,11 +1298,12 @@ cw::rc_t cw::midi_record_play::create( handle_t& hRef, io::handle_t ioH, const o
|
||||
return rc;
|
||||
|
||||
p = mem::allocZ<midi_record_play_t>();
|
||||
|
||||
p->ioH = ioH; // p->ioH is used in _destory() so initialize it here
|
||||
|
||||
if((rc = _parseCfg(p,cfg)) != kOkRC )
|
||||
goto errLabel;
|
||||
|
||||
p->ioH = ioH;
|
||||
p->cb = cb;
|
||||
p->cb_arg = cb_arg;
|
||||
p->halfPedalState = kHalfPedalDone;
|
||||
|
Loading…
Reference in New Issue
Block a user