From 7fa682eba154dd3dbf7f0d57a55327132c68f6d1 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Fri, 9 Oct 2009 18:26:41 +0000 Subject: [PATCH] Be more careful with pointers in swapwin --- scrotwm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scrotwm.c b/scrotwm.c index ad295f7..16363f8 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -52,7 +52,7 @@ static const char *cvstag = "$scrotwm$"; -#define SWM_VERSION "0.9.11" +#define SWM_VERSION "0.9.12" #include #include @@ -1553,6 +1553,8 @@ swapwin(struct swm_region *r, union arg *args) else return; } + if (target == NULL || source == NULL) + return; source->ws->focus_prev = target; TAILQ_REMOVE(wl, target, entry); TAILQ_INSERT_BEFORE(source, target, entry); -- 1.7.10.4