From 4f4005ac4a0db5b80b270a1e76c204bafcc4d079 Mon Sep 17 00:00:00 2001 From: Tibor Nagy <xnagytibor@gmail.com> Date: Mon, 11 Feb 2019 12:57:42 +0100 Subject: [PATCH] sdl: Fix null pointer dereference In some cases the SDL event loop could kick in before the window gets initialized. --- recipes/sdl/redox.patch | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/sdl/redox.patch b/recipes/sdl/redox.patch index 838df6fd2..85320bb2c 100644 --- a/recipes/sdl/redox.patch +++ b/recipes/sdl/redox.patch @@ -380,7 +380,7 @@ diff -ruwN source/src/thread/pthread/SDL_systhread.c source-new/src/thread/pthre diff -ruwN source/src/video/orbital/SDL_orbitalevents.c source-new/src/video/orbital/SDL_orbitalevents.c --- source/src/video/orbital/SDL_orbitalevents.c 1969-12-31 17:00:00.000000000 -0700 +++ source-new/src/video/orbital/SDL_orbitalevents.c 2018-12-29 15:57:00.298520310 -0700 -@@ -0,0 +1,197 @@ +@@ -0,0 +1,201 @@ +/* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2012 Sam Lantinga @@ -425,6 +425,10 @@ diff -ruwN source/src/video/orbital/SDL_orbitalevents.c source-new/src/video/orb +{ + SDL_keysym keysym; + ++ if (!this->hidden->window) { ++ return; ++ } ++ + void* event_iter = orb_window_events(this->hidden->window); + OrbEventOption oeo = orb_events_next(event_iter); + -- GitLab