Commit 639b39c46cda7b05c06145b3f0f7f8e1ba2d028e

Sam Lantinga 2014-10-15T09:09:57

Fixed crash if the event subsystem didn't initialize properly

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/core/linux/SDL_evdev.c b/src/core/linux/SDL_evdev.c
index 19333f2..c4a7d05 100644
--- a/src/core/linux/SDL_evdev.c
+++ b/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