Explorar o código

Fixed crash if the event subsystem didn't initialize properly

Sam Lantinga %!s(int64=11) %!d(string=hai) anos
pai
achega
639b39c46c
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/core/linux/SDL_evdev.c

+ 4 - 0
src/core/linux/SDL_evdev.c

@@ -584,6 +584,10 @@ SDL_EVDEV_Poll(void)
     Uint32 kval;
 #endif
 
+    if (!_this) {
+        return;
+    }
+
 #if SDL_USE_LIBUDEV
     SDL_UDEV_Poll();
 #endif