diff --git a/packages/hotkey_manager_linux/linux/hotkey_manager_linux_plugin.cc b/packages/hotkey_manager_linux/linux/hotkey_manager_linux_plugin.cc index 74fabe2..f3d9f51 100644 --- a/packages/hotkey_manager_linux/linux/hotkey_manager_linux_plugin.cc +++ b/packages/hotkey_manager_linux/linux/hotkey_manager_linux_plugin.cc @@ -40,6 +40,8 @@ void handle_key_down(const char* keystring, void* user_data) { if (result != hotkey_id_map.end()) identifier = result->first.c_str(); + else + identifier = ""; g_autoptr(FlValue) event_data = fl_value_new_map(); fl_value_set_string_take(event_data, "identifier", @@ -111,6 +113,8 @@ static FlMethodResponse* hkm_unregister(_HotkeyManagerLinuxPlugin* self, if (result != hotkey_id_map.end()) keystring = result->second.c_str(); + else + keystring = ""; keybinder_unbind(keystring, handle_key_down); hotkey_id_map.erase(identifier);