瀏覽代碼

Fixed crash if the event subsystem didn't initialize properly

Sam Lantinga 10 年之前
父節點
當前提交
639b39c46c
共有 1 個文件被更改,包括 4 次插入0 次删除
  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