Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix the null pointer I found

  • Loading branch information...
commit bfd1df7e1d173c48edd829ec53c5366a31937421 1 parent 9fc78f4
@JordanPerkins authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/WebModules.cpp
View
7 src/WebModules.cpp
@@ -686,12 +686,13 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
break;
}
+ if (!pModule)
+ return PAGE_NOTFOUND;
+
m_Template["ModPath"] = pModule->GetWebPath();
m_Template["ModFilesPath"] = pModule->GetWebFilesPath();
- if (!pModule) {
- return PAGE_NOTFOUND;
- } else if (pModule->WebRequiresLogin() && !ForceLogin()) {
+ if (pModule->WebRequiresLogin() && !ForceLogin()) {
return PAGE_PRINT;
} else if (pModule->WebRequiresAdmin() && !GetSession()->IsAdmin()) {
PrintErrorPage(403, "Forbidden", "You need to be an admin to access this module");
Please sign in to comment.
Something went wrong with that request. Please try again.