1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 10:22:52 +01:00

Fix segfault on pressing Command+q in main menu.

This commit is contained in:
Christoph Heiss 2018-02-01 15:58:51 +01:00 committed by Daniel Evans
parent 256e5e73ad
commit 45107f5afb

View File

@ -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);
}