[dev] [tabbed] [PATCH] fix bug in unmanage: check if lastsel is initialized

From: Markus Teich <markus.teich_AT_stusta.mhn.de>
Date: Tue, 10 Mar 2015 11:29:43 +0100

---
Heyho,
Here you go. That fixed it for me.
The -d was irrelevant in reproducing the problem, please provide minimal
reproduction testcases, when reporting bugs, the backgrounding is kind of
annoying to debug if you always have to attach to the running process with gdb.
--Markus
 tabbed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tabbed.c b/tabbed.c
index d24b299..b15f9cb 100644
--- a/tabbed.c
+++ b/tabbed.c
_AT_@ -1125,7 +1125,7 @@ unmanage(int c) {
 			lastsel--;
 		}
 
-		if(c == sel) {
+		if(c == sel && lastsel >= 0) {
 			focus(lastsel);
 		} else {
 			if(sel > c)
-- 
2.0.5
Received on Tue Mar 10 2015 - 11:29:43 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 10 2015 - 11:36:07 CET