From e4595992a53ee5eeeb7ff01f2c991f114379a414 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 15 Dec 2019 21:58:10 +1000 Subject: [PATCH] Frontend: Fix crash in controller input --- src/duckstation/sdl_host_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/duckstation/sdl_host_interface.cpp b/src/duckstation/sdl_host_interface.cpp index 8de754076..5a53f650a 100644 --- a/src/duckstation/sdl_host_interface.cpp +++ b/src/duckstation/sdl_host_interface.cpp @@ -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;