[magnifier] Check for n > 0

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-27 21:28:29 +02:00
parent 6ad47dc828
commit 1b41983a6f
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ layout_magnifier(int screen)
if(IS_TILED(c, screen) && c != focus) if(IS_TILED(c, screen) && c != focus)
n++; n++;
/* No other clients. */
if(!n)
return;
geometry.x = area.x; geometry.x = area.x;
geometry.y = area.y; geometry.y = area.y;
geometry.height = area.height / n; geometry.height = area.height / n;