Avoid NPEs for incorrect client logo URLs
parent
ec28327605
commit
ebdce87f5f
|
@ -514,6 +514,10 @@ public class ClientAPI {
|
|||
// get the image from cache
|
||||
CachedImage image = clientLogoLoadingService.getLogo(client);
|
||||
|
||||
if (image == null){
|
||||
return new ResponseEntity<>(HttpStatus.NOT_FOUND);
|
||||
}
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.parseMediaType(image.getContentType()));
|
||||
headers.setContentLength(image.getLength());
|
||||
|
|
Loading…
Reference in New Issue