reaper-oss / sws

The SWS extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc
https://www.sws-extension.org/
MIT License
455 stars 85 forks source link

"SWS/FNG: Show only used CC lanes" crashes Reaper when the MIDI Editor is empty #1869

Closed BenTalagan closed 3 months ago

BenTalagan commented 6 months ago

I'm on MacOS X 13.6.7, Reaper 7.15, SWS v2.14.0.1.

Steps to reproduce :

The take validity should probably be checked here (and an error could probably be thrown just like at the line before) :

https://github.com/reaper-oss/sws/blob/4a37570da2f5535e2ef38ffdef585a87053d8211/Fingers/RprMidiCCLane.cpp#L122

Since this function is used by other actions, this bug probably affects them too.

cfillion commented 6 months ago

Nice catch, fixing! I've reviewed all MIDIEditor_GetTake call sites, turns out 8 actions are affected by the crash.

(Also, Contents > Options when using one MIDI editor per project > Close editor when the active media item is deleted in arrange view has to be disabled.)

BenTalagan commented 6 months ago

Thanks, @cfillion !