Closed jjceresa closed 4 years ago
Just realized typos mistakes in the message of PR https://github.com/swami/libinstpatch/pull/43. the IpatchItem
concerned by the bug are Instruments
(instead of Instrument zones) and Presets
(instead of Preset zones).
It doesn't work that way. I fixed it on master instead.
During a copy/paste of Instrument(s) (or Preset(s)), paste operation fails. The bug is in ipatch_item_copy_link_func().
This function is called by ipatch_item_duplicate() or ipatch_item_duplicate_link_func(). In the case of ipatch_item_duplicate(), the function is called by ipatch_item_copy() using the class method klass->copy(dest, src, NULL, NULL). As the method implemented by derived IpatchItem objects (IpatchSF2Inst, IpatchSF2Preset,...) is calling ipatch_item_copy_link_func(), that leads to link_func parameter set to NULL which is a valid parameter.
ipatch_item_copy_link_func(), should ignore if link_func is NULL.