This commit is contained in:
Jan Bartel 2017-04-14 14:43:41 +10:00
parent 2ba44ac058
commit 509f59c32d
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class ResourceContentFactory implements ContentFactory
{
String compressedPathInContext = pathInContext + format._extension;
Resource compressedResource = _factory.getResource(compressedPathInContext);
if (compressedResource.exists() && compressedResource.lastModified() >= resource.lastModified()
if (compressedResource != null && compressedResource.exists() && compressedResource.lastModified() >= resource.lastModified()
&& compressedResource.length() < resource.length())
compressedContents.put(format,
new ResourceHttpContent(compressedResource,_mimeTypes.getMimeByExtension(compressedPathInContext),maxBufferSize));