Potential nullptr dereference in PianoView::updateNotes()
- I opened a .mscz generated by the online PDF importer (from a guitar score+tab) and started figuring out how to get rid of the empty 2nd stave that could (should) have been the tabulature representation.
- I opened the piano roll editor during this quest (and closed it without doing anything). I don't remember exactly what I did and in what order, but after finally getting rid of that stave
- I tried to adjust the page settings. Changing the paper size went OK but while adjusting the margins mscore crashed and KDE's DrKonqi popped up.
The crash happened in PianoView::updateNotes(), trying to get the staff ID from a NULL _staff pointer variable. I suppose that variable should have pointed to the stave I deleted. I added a local patch to my build (
int staffIdx = _staff ? _staff->idx() : -1;) but haven't taken the time to check if that doesn't just delay the crash (IOW, if more locations need to be patched). I guess the real question is why a PianoView instance would be updated if it has been closed.