소스 검색

applied endless loop prevention on zoom()

arg@10ksloc.org 19 년 전
부모
커밋
525ef3c178
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      client.c

+ 3 - 1
client.c

@@ -469,9 +469,11 @@ zoom(Arg *arg)
 	if(!sel || (arrange != dotile) || sel->isfloat)
 		return;
 
-	if(sel == getnext(clients) && sel->next)  {
+	if(sel == getnext(clients))  {
 		if((c = getnext(sel->next)))
 			sel = c;
+		else
+			return;
 	}
 
 	/* pop */