Check for comic opening failures before trying to serve a page.

This commit is contained in:
Luis Ángel San Martín 2018-04-28 18:00:40 +02:00
parent 618f6575b2
commit 0e45767e67

View File

@ -48,6 +48,18 @@ void PageControllerV2::service(HttpRequest& request, HttpResponse& response)
comicFile = ySession->getCurrentComic();
currentComicId = ySession->getCurrentComicId();
}
if (comicFile->hasBeenAnErrorOpening()) {
//delete comicFile;
if(remote)
ySession->dismissCurrentRemoteComic();
else
ySession->dismissCurrentComic();
response.setStatus(404,"not found");
response.write("404 not found",true);
return;
}
if(currentComicId != 0 && !QPointer<Comic>(comicFile).isNull())
{