Przeglądaj źródła

Fixed crash if the event subsystem didn't initialize properly

Sam Lantinga 11 lat temu
rodzic
commit
639b39c46c
1 zmienionych plików z 4 dodań i 0 usunięć
  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;
     Uint32 kval;
 #endif
 #endif
 
 
+    if (!_this) {
+        return;
+    }
+
 #if SDL_USE_LIBUDEV
 #if SDL_USE_LIBUDEV
     SDL_UDEV_Poll();
     SDL_UDEV_Poll();
 #endif
 #endif