mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Avoid potential null pointer access
This commit is contained in:
parent
6848295ba4
commit
6cf11f47e1
@ -46,6 +46,12 @@ void PageControllerV2::service(HttpRequest &request, HttpResponse &response)
|
|||||||
currentComicId = ySession->getCurrentComicId();
|
currentComicId = ySession->getCurrentComicId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (comicFile == nullptr) {
|
||||||
|
response.setStatus(404, "not found");
|
||||||
|
response.write("404 not found", true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (comicFile->hasBeenAnErrorOpening()) {
|
if (comicFile->hasBeenAnErrorOpening()) {
|
||||||
//delete comicFile;
|
//delete comicFile;
|
||||||
if (remote)
|
if (remote)
|
||||||
|
Loading…
Reference in New Issue
Block a user