projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06b6d23
)
* luci/libs: uvl: fix possible "attempt to index field '?' (a nil value)" in uvl...
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 1 Sep 2008 20:48:18 +0000
(20:48 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 1 Sep 2008 20:48:18 +0000
(20:48 +0000)
libs/uvl/luasrc/uvl.lua
patch
|
blob
|
history
diff --git
a/libs/uvl/luasrc/uvl.lua
b/libs/uvl/luasrc/uvl.lua
index 66e7eeaead9e5b4bcdd80602d6bfc8c59637d901..0823028376fb4cacf111a31fc16255e7678b51da 100644
(file)
--- a/
libs/uvl/luasrc/uvl.lua
+++ b/
libs/uvl/luasrc/uvl.lua
@@
-777,9
+777,10
@@
function uvlitem.config(self, opt)
local c
if #self.cref == 4 or #self.cref == 3 then
- c = self.c[self.cref[2]][self.cref[3]]
+ c = self.c and self.c[self.cref[2]] or nil
+ c = c and c[self.cref[3]] or nil
elseif #self.cref == 2 then
- c = self.c
[self.cref[2]]
+ c = self.c
and self.c[self.cref[2]] or nil
else
c = self.c
end