# DP: some changes from the branch upstream/musescore_232_go_backend
# DP: up to commit c1cbe9b0c4d0bef25d0323804bd54305cc30c081
# DP: but without the experimental exports for musescore.com

--- a/libmscore/score.cpp
+++ b/libmscore/score.cpp
@@ -4051,6 +4051,8 @@ int Score::keysig()
 int Score::duration()
       {
       updateRepeatList(true);
+      if (repeatList()->isEmpty())
+            return 0;
       RepeatSegment* rs = repeatList()->last();
       return lrint(utick2utime(rs->utick + rs->len()));
       }
--- a/libmscore/sym.cpp
+++ b/libmscore/sym.cpp
@@ -5452,7 +5452,7 @@ void initScoreFonts()
       int error = FT_Init_FreeType(&ftlib);
       if (!ftlib || error)
             qFatal("init freetype library failed");
-      qDebug("initScoreFonts %p", ftlib);
+      //qDebug("initScoreFonts %p", ftlib);
       int index = 0;
       for (auto i : Sym::symNames)
             Sym::lnhash.insert(i, SymId(index++));
--- a/libmscore/undo.cpp
+++ b/libmscore/undo.cpp
@@ -1686,7 +1686,7 @@ RemoveElement::RemoveElement(Element* e)
 void RemoveElement::cleanup(bool undo)
       {
       if (undo) {
-            qDebug("RemoveElement::cleanup: delete %d %s", undo, element->name());
+            //qDebug("RemoveElement::cleanup: delete %d %s", undo, element->name());
             delete element;
             element = 0;
             }
