From: Jo-Philipp Wich Date: Mon, 11 Oct 2021 17:01:39 +0000 (+0200) Subject: luci-base: dispatcher: fix null access on dispatching unknown urls X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=4d28c390ab181636b101a17203b2db3391784687;p=openwrt-luci.git luci-base: dispatcher: fix null access on dispatching unknown urls Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 2f965b16a8..bd1b112f60 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -918,7 +918,9 @@ function dispatch(request) return end - page.readonly = not perm + if page then + page.readonly = not perm + end end local action = (page and type(page.action) == "table") and page.action or {}