Skip to content

Commit

Permalink
Fix #332925: Half duration shortcut crashes musescore when time signa…
Browse files Browse the repository at this point in the history
…ture is 5/4

Crash happens only in Debug builds.

Backport of musescore#12084
  • Loading branch information
Jojo-Schmitz committed Jun 18, 2022
1 parent b9f1c19 commit 3a2ebeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2693,7 +2693,7 @@ void Score::cmdIncDecDuration(int nSteps, bool stepDotted)

// if measure rest is selected as input, then the correct initialDuration will be the
// duration of the measure's time signature, else is just the input state's duration
TDuration initialDuration = (cr->durationType() == TDuration::DurationType::V_MEASURE) ? TDuration(cr->measure()->timesig()) : _is.duration();
TDuration initialDuration = (cr->durationType() == TDuration::DurationType::V_MEASURE) ? TDuration(cr->measure()->timesig(), true) : _is.duration();
TDuration d = initialDuration.shiftRetainDots(nSteps, stepDotted);
if (!d.isValid())
return;
Expand Down

0 comments on commit 3a2ebeb

Please sign in to comment.