From: Marco Peereboom Date: Fri, 9 Oct 2009 18:26:41 +0000 (+0000) Subject: Be more careful with pointers in swapwin X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;ds=sidebyside;h=7fa682eba154dd3dbf7f0d57a55327132c68f6d1;p=spectrwm.git Be more careful with pointers in swapwin --- 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);