Prevent NullPinterException. Thank's to Felix!
This commit is contained in:
parent
4170996e85
commit
bd1ac8583a
|
@ -90,6 +90,7 @@ public class MediaBroadcast extends HttpServletCM
|
||||||
response.setContentType(thisMedia.getMediaType());
|
response.setContentType(thisMedia.getMediaType());
|
||||||
// Binary / Image content will get handled here
|
// Binary / Image content will get handled here
|
||||||
MImage thisImage = thisMedia.getImage();
|
MImage thisImage = thisMedia.getImage();
|
||||||
|
if (thisImage != null) {
|
||||||
response.setContentLength(thisImage.getData().length);
|
response.setContentLength(thisImage.getData().length);
|
||||||
|
|
||||||
// Open the file and output streams
|
// Open the file and output streams
|
||||||
|
@ -106,6 +107,7 @@ public class MediaBroadcast extends HttpServletCM
|
||||||
in.close();
|
in.close();
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
response.sendError(404);
|
response.sendError(404);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue