diff --git a/src/library/dlgtrackinfomulti.cpp b/src/library/dlgtrackinfomulti.cpp index 8f352d17d41..76dd8c95adb 100644 --- a/src/library/dlgtrackinfomulti.cpp +++ b/src/library/dlgtrackinfomulti.cpp @@ -807,13 +807,13 @@ void DlgTrackInfoMulti::slotKeyTextChanged() { QString newTextInput = txtKey->currentText().trimmed(); QString newKeyText; - mixxx::track::io::key::ChromaticKey newKey = - KeyUtils::guessKeyFromText(newTextInput); - if (newKey != mixxx::track::io::key::INVALID) { - newKeyText = KeyUtils::keyToString(newKey); - } else if (newTextInput.isEmpty()) { - // Empty text is not a valid key but indicates we want to clear the key. - newKeyText = QString(); + // Empty text is not a valid key but indicates we want to clear the key. + if (!newTextInput.isEmpty()) { + mixxx::track::io::key::ChromaticKey newKey = + KeyUtils::guessKeyFromText(newTextInput); + if (newKey != mixxx::track::io::key::INVALID) { + newKeyText = KeyUtils::keyToString(newKey); + } } txtKey->blockSignals(true);