summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_console.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hid/emulated_console.cpp')
-rw-r--r--src/core/hid/emulated_console.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hid/emulated_console.cpp b/src/core/hid/emulated_console.cpp
index 012909954..dfbaa3f8c 100644
--- a/src/core/hid/emulated_console.cpp
+++ b/src/core/hid/emulated_console.cpp
@@ -209,10 +209,11 @@ int EmulatedConsole::SetCallback(ConsoleUpdateCallback update_callback) {
void EmulatedConsole::DeleteCallback(int key) {
std::lock_guard lock{mutex};
- if (!callback_list.contains(key)) {
+ const auto& iterator = callback_list.find(key);
+ if (iterator == callback_list.end()) {
LOG_ERROR(Input, "Tried to delete non-existent callback {}", key);
return;
}
- callback_list.erase(key);
+ callback_list.erase(iterator);
}
} // namespace Core::HID