Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e463aa
)
Fix crash in rg_n/mvrg_n when the target region does not exist.
author
Reginald Kennedy
<rk@rejii.com>
Thu, 18 Jul 2013 04:04:05 +0000
(12:04 +0800)
committer
Reginald Kennedy
<rk@rejii.com>
Thu, 18 Jul 2013 04:13:31 +0000
(12:13 +0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
629f699
..
4aff709
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-3659,7
+3659,7
@@
focusrg(struct swm_region *r, union arg *args)
DNPRINTF(SWM_D_FOCUS, "focusrg: id: %d\n", ridx);
rr = TAILQ_FIRST(&r->s->rl);
- for (i = 0; i < ridx; ++i)
+ for (i = 0; i < ridx && rr != NULL; ++i)
rr = TAILQ_NEXT(rr, entry);
if (rr == NULL)
@@
-4671,7
+4671,7
@@
send_to_rg(struct swm_region *r, union arg *args)
DNPRINTF(SWM_D_FOCUS, "send_to_rg: id: %d\n", ridx);
rr = TAILQ_FIRST(&r->s->rl);
- for (i = 0; i < ridx; ++i)
+ for (i = 0; i < ridx && rr != NULL; ++i)
rr = TAILQ_NEXT(rr, entry);
if (rr == NULL)