Skip to content

Commit

Permalink
(fix) Controllers: return from loadSettings() when there's no mapping…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
ronso0 committed Oct 12, 2024
1 parent fc19b47 commit 79feae8
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 79feae8

Please sign in to comment.