mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
Fix segfault on pressing Command+q in main menu.
This commit is contained in:
parent
256e5e73ad
commit
45107f5afb
@ -867,7 +867,7 @@ void RWGame::globalKeyEvent(const SDL_Event& event) {
|
||||
}
|
||||
|
||||
std::string keyName = SDL_GetKeyName(event.key.keysym.sym);
|
||||
if (keyName.length() == 1) {
|
||||
if (getPlayer() && keyName.length() == 1) {
|
||||
char symbol = keyName[0];
|
||||
handleCheatInput(symbol);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user