File: assert-setpos.diff

package info (click to toggle)
musescore3 3.2.3%2Bdfsg2-21
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 219,852 kB
  • sloc: cpp: 291,412; xml: 200,226; sh: 3,779; ansic: 1,447; python: 393; makefile: 246; perl: 82; pascal: 79
file content (19 lines) | stat: -rw-r--r-- 681 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: fix assertion after playing a score
 Seq::guiStop triggers this; enforce bounds manually simply
Author: mirabilos <tg@debian.org>
Forwarded: not-yet
Justification: upstream only cares about 4.x these days
 (perhaps to 3.7?)

--- a/libmscore/score.cpp
+++ b/libmscore/score.cpp
@@ -3769,7 +3769,8 @@ void Score::setPos(POS pos, Fraction tic
       {
       if (tick < Fraction(0,1))
             tick = Fraction(0,1);
-      Q_ASSERT(tick <= lastMeasure()->endTick());
+      if (tick > lastMeasure()->endTick())
+            tick = lastMeasure()->endTick();
 
       _pos[int(pos)] = tick;
       // even though tick position might not have changed, layout might have