Frontend: Fix crash in controller input

This commit is contained in:
Connor McLaughlin 2019-12-15 21:58:10 +10:00
parent 6e18e56089
commit e4595992a5
1 changed files with 1 additions and 1 deletions

View File

@ -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"); // 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) if (!controller)
return; return;