-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent crash on system with no measures #26473
Conversation
@@ -82,7 +82,7 @@ void PageLayout::getNextPage(LayoutContext& ctx) | |||
} else { | |||
state.setPage(dom.pages()[state.pageIdx()]); | |||
std::vector<System*>& systems = state.page()->systems(); | |||
state.setPageOldMeasure(systems.empty() ? nullptr : systems.back()->measures().back()); | |||
state.setPageOldMeasure(systems.empty() || systems.back()->measures().empty() ? nullptr : systems.back()->measures().back()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny enough almost the same code is used in Mu3.7, came in there via Jojo-Schmitz#391. Back then neither I nor the author @jforberg seem to have realized that Mu4 is suffering from the same issue and needs the same fix
But is it valid that a system with no measures ever exists? (Or should I see this as a quick fix before the release and can we do a deeper investigation later?) |
Also check the video at Jojo-Schmitz#391 (comment) |
e8ec26c
to
51623c0
Compare
@cbjeukendrup I think it would be better to put the one line fix in 4.5 and put the more thorough clean up in master once 4.5 diverges. I'm not feeling like throwing |
Yeah, totally fair. Seems indeed too complicated and risky for this phase. |
Resolves: #24705
Resolves: #24648
Crash on layout change which results in a system with a single measure being removed. This crash does not happen when deleting the measure.
Screen.Recording.2025-02-13.at.11.37.15.mov