fix #42231: crash on delete all measures if frame present
Merge pull request #1580 from MarcSabatella/42231-delete-last-crash

fix #42231: crash on delete all measures if frame present