add more backported fixes
[alioth/musescore.git] / debian / patches / upstream / crash-triplet.diff
1 Origin: backport, commit:f654f707997610f7de96eeaeadda1ad296034630
2 Author: Rory McLeod <mcleodnw@gmail.com>
3 Description: fix #285040 crash when changing a triplet's rest's duration
4  - Prevent a null pointer deref when searching a linked tuplet.
5
6 --- a/libmscore/undo.cpp
7 +++ b/libmscore/undo.cpp
8 @@ -1419,7 +1419,8 @@ void Score::undoAddCR(ChordRest* cr, Mea
9                                if (nt == 0)
10                                      qDebug("linked tuplet not found");
11                                }
12 -                        newcr->setTuplet(nt);
13 +                        if (nt)
14 +                              newcr->setTuplet(nt);
15                          }
16                    }
17              undo(new AddElement(newcr));