Frontend: Fix crash in controller input
This commit is contained in:
parent
6e18e56089
commit
e4595992a5
|
@ -659,7 +659,7 @@ void SDLHostInterface::HandleSDLControllerButtonEventForController(const SDL_Eve
|
|||
{
|
||||
// Log_DevPrintf("button %d %s", ev->cbutton.button, ev->cbutton.state == SDL_PRESSED ? "pressed" : "released");
|
||||
|
||||
Controller* controller = m_system->GetController(0);
|
||||
Controller* controller = m_system ? m_system->GetController(0) : nullptr;
|
||||
if (!controller)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue