Skip to content

Commit a850a99

Browse files
committed
Fixed NPE in the WebSite class
1 parent e530f18 commit a850a99

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/javaxt/express/cms/WebSite.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ private javaxt.io.File getFile(String path){
306306

307307
//Loop through possible file combinations
308308
for (String str : files){
309-
java.io.File file = fileManager.getFile(path);
309+
java.io.File file = fileManager.getFile(str);
310310
if (file!=null) return new javaxt.io.File(file);
311311
}
312312

@@ -341,6 +341,9 @@ private void sendHTML(HttpServletRequest request, HttpServletResponse response)
341341
useTemplate = false;
342342
}
343343
}
344+
if (useTemplate){
345+
if (template==null || !template.exists()) useTemplate = false;
346+
}
344347

345348

346349

0 commit comments

Comments
 (0)