From 4c2c741743896b258b62490d13bd735ab1aa7076 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Mon, 9 Nov 2009 18:15:06 +0100 Subject: [PATCH] Rules: check if properties of a rule exist Actually check if properties are set now, since we can also only apply callbacks now. Signed-off-by: Julien Danjou --- lib/awful/rules.lua.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/awful/rules.lua.in b/lib/awful/rules.lua.in index ccee9c84..8859b2aa 100644 --- a/lib/awful/rules.lua.in +++ b/lib/awful/rules.lua.in @@ -94,8 +94,10 @@ function apply(c) local callbacks = {} for _, entry in ipairs(rules) do if match(c, entry.rule) then - for property, value in pairs(entry.properties) do - props[property] = value + if entry.properties then + for property, value in pairs(entry.properties) do + props[property] = value + end end if entry.callback then table.insert(callbacks, entry.callback)