浏览代码

Fixed crash if the event subsystem didn't initialize properly

Sam Lantinga 12 年之前
父节点
当前提交
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;
     Uint32 kval;
 #endif
 #endif
 
 
+    if (!_this) {
+        return;
+    }
+
 #if SDL_USE_LIBUDEV
 #if SDL_USE_LIBUDEV
     SDL_UDEV_Poll();
     SDL_UDEV_Poll();
 #endif
 #endif