Missing nullchecks -> unhandled exceptions

This commit is contained in:
Pavel Vesely
2020-02-08 17:35:27 +01:00
parent 34936eab6b
commit b012a0dcaa
2 changed files with 14 additions and 8 deletions

View File

@ -408,7 +408,7 @@
if (module.PageId == pageid)
{
// ensure module's pane exists in current page and if not, assign it to the Admin pane
if (!panes.ToLower().Contains(module.Pane.ToLower()))
if (panes == null || !panes.ToLower().Contains(module.Pane.ToLower()))
{
module.Pane = Constants.AdminPane;
}