diff --git a/src/preferences/keymap/KeymapWindow.cpp b/src/preferences/keymap/KeymapWindow.cpp index b25fa9d2e8..c78dea386e 100644 --- a/src/preferences/keymap/KeymapWindow.cpp +++ b/src/preferences/keymap/KeymapWindow.cpp @@ -305,7 +305,12 @@ KeymapWindow::MessageReceived(BMessage* message) KeymapListItem* item = static_cast(listView->ItemAt(index)); if (item != NULL) { - fCurrentMap.Load(item->EntryRef()); + status_t status = fCurrentMap.Load(item->EntryRef()); + if (status != B_OK) { + listView->RemoveItem(item); + break; + } + fAppliedMap = fCurrentMap; fKeyboardLayoutView->SetKeymap(&fCurrentMap); _UseKeymap();