From 5d321c85f5df256ef4cef166bbef2d0b9c5df72e Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 9 Mar 2019 01:35:52 +0000 Subject: [PATCH] Don't release window resource when unredirected Because when the screen is unredirected, the window resource would have already been freed. Fix a NULL pointer deref. Signed-off-by: Yuxuan Shui --- src/win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win.c b/src/win.c index 1bb7f66..763a05b 100644 --- a/src/win.c +++ b/src/win.c @@ -640,7 +640,7 @@ void win_on_win_size_change(session_t *ps, win *w) { w->shadow_height = w->heightb + ps->o.shadow_radius * 2; w->flags |= WFLAG_SIZE_CHANGE; // Invalidate the shadow we built - if (ps->o.experimental_backends) { + if (ps->o.experimental_backends && ps->redirected) { if (w->state == WSTATE_MAPPED || w->state == WSTATE_MAPPING || w->state == WSTATE_FADING) {