luci-base: dispatcher: fix null access on dispatching unknown urls
authorJo-Philipp Wich <[email protected]>
Mon, 11 Oct 2021 17:01:39 +0000 (19:01 +0200)
committerJo-Philipp Wich <[email protected]>
Mon, 11 Oct 2021 17:02:18 +0000 (19:02 +0200)
Signed-off-by: Jo-Philipp Wich <[email protected]>
modules/luci-base/luasrc/dispatcher.lua

index 2f965b16a857b0b713e8c79411e2bf59ef7548c2..bd1b112f60cdb6816c01d18b371d78f8596684b3 100644 (file)
@@ -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 {}