Skip to content

Commit

Permalink
Merge pull request #13738 from ronso0/mapping-file-doesnt-exist
Browse files Browse the repository at this point in the history
(fix) Controllers: return from loadSettings() when there's no mapping file
  • Loading branch information
JoergAtGithub authored Oct 12, 2024
2 parents fc19b47 + 79feae8 commit 46ed229
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controllers/legacycontrollermapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ const QString kControllerSettingsResourcePathSubst = QStringLiteral("%RESOURCE_P
void LegacyControllerMapping::loadSettings(UserSettingsPointer pConfig,
const QString& controllerName) const {
auto mappingFile = QFileInfo(m_filePath);
DEBUG_ASSERT(mappingFile.exists());
if (!mappingFile.exists()) {
// This happens when we start the MIDI Learning Wizard with a new (empty)
// mapping, or when the mapping file has been removed manually by the user.
return;
}
QString controllerPath =
mappingFile.absoluteFilePath()
.replace(pConfig->getSettingsPath(),
Expand Down

0 comments on commit 46ed229

Please sign in to comment.