From 02a1cb7a0cbd28ddb8b2f39a1deac3ee0d6de44b Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Wed, 25 Oct 2023 08:32:13 +0200 Subject: [PATCH] added check for mupp script in case the data collection is not readable. --- src/musredit_qt5/mupp/PmuppScript.cpp | 3 ++- src/musredit_qt6/mupp/PmuppScript.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/musredit_qt5/mupp/PmuppScript.cpp b/src/musredit_qt5/mupp/PmuppScript.cpp index 8783e673..dfd24d7a 100644 --- a/src/musredit_qt5/mupp/PmuppScript.cpp +++ b/src/musredit_qt5/mupp/PmuppScript.cpp @@ -208,7 +208,8 @@ int PmuppScript::loadCollection(const QString str) flnList << fln; QString errorMsg(""); - fParamDataHandler->ReadParamFile(flnList, errorMsg); + if (!fParamDataHandler->ReadParamFile(flnList, errorMsg)) + return 1; return 0; } diff --git a/src/musredit_qt6/mupp/PmuppScript.cpp b/src/musredit_qt6/mupp/PmuppScript.cpp index 4d9ddafb..fdf21c3f 100644 --- a/src/musredit_qt6/mupp/PmuppScript.cpp +++ b/src/musredit_qt6/mupp/PmuppScript.cpp @@ -200,7 +200,8 @@ int PmuppScript::loadCollection(const QString str) flnList << fln; QString errorMsg(""); - fParamDataHandler->ReadParamFile(flnList, errorMsg); + if (!fParamDataHandler->ReadParamFile(flnList, errorMsg)) + return 1; return 0; }