Skip to content

Commit

Permalink
fix: Avoid NPE when displaying Page - Meeds-io/meeds#845 (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed Mar 22, 2023
1 parent 0c7959e commit 73201be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public String getSiteClass() {
}

protected boolean isShowSiteBody(PortalRequestContext requestContext) {
return !requestContext.isShowMaxWindow() && !Util.getUIPage().isShowMaxWindow();
return !requestContext.isShowMaxWindow() && (Util.getUIPage() == null || !Util.getUIPage().isShowMaxWindow());
}

protected void processPageBodyRender(WebuiRequestContext context) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void processRender(WebuiRequestContext context) throws Exception {
}

protected boolean isShowSharedLayout(PortalRequestContext requestContext) {
return !requestContext.isHideSharedLayout() && !Util.getUIPage().isHideSharedLayout();
return !requestContext.isHideSharedLayout() && (Util.getUIPage() == null || !Util.getUIPage().isHideSharedLayout());
}

protected void processSiteBodyRender(WebuiRequestContext context) throws Exception {
Expand Down

0 comments on commit 73201be

Please sign in to comment.