aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/sdl2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/sdl2.c b/ui/sdl2.c
index 2d601798ea..5cb75aa364 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -521,6 +521,10 @@ static void handle_windowevent(SDL_Event *ev)
{
struct sdl2_console *scon = get_scon_from_window(ev->window.windowID);
+ if (!scon) {
+ return;
+ }
+
switch (ev->window.event) {
case SDL_WINDOWEVENT_RESIZED:
{