From 09c816223559ce4713c94b43356797f334e93938 Mon Sep 17 00:00:00 2001 From: Zion Date: Tue, 12 Jun 2018 08:12:37 -0700 Subject: [PATCH] evdev: Add nullptr check, fixes #4713 (#4744) --- rpcs3/evdev_joystick_handler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/evdev_joystick_handler.cpp b/rpcs3/evdev_joystick_handler.cpp index e3541ac4fb..44a4c8d55d 100644 --- a/rpcs3/evdev_joystick_handler.cpp +++ b/rpcs3/evdev_joystick_handler.cpp @@ -250,9 +250,9 @@ void evdev_joystick_handler::GetNextButtonPress(const std::string& padId, const // Get our evdev device EvdevDevice* device = get_device(padId); - libevdev* dev = device->device; - if (dev == nullptr) + if (device == nullptr || device->device == nullptr) return; + libevdev* dev = device->device; // Try to query the latest event from the joystick. input_event evt;