commit 62b079cdd94c34cef1184f0a845e98d8359d5b15
parent 4847eed9391784f172ea24196241ef3b57083037
Author: Suraj N. Kurapati <sunaku@gmail.com>
Date: Sat, 16 Sep 2006 22:08:41 -0700
[project @ 80f939d3fdffa172651b6733eb620c46536467e1]
[project @ 101]
fix nil exception
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/wm.rb b/wm.rb
@@ -521,8 +521,12 @@ module Wmii
private
# Returns the number of clients in the non-floating areas of this view.
def num_grounded_clients
- areas[1..-1].inject(0) do |count, area|
- count + area.length
+ if ground = areas[1..-1]
+ ground.inject(0) do |count, area|
+ count + area.length
+ end
+ else
+ 0
end
end
end