mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Check for comic opening failures before trying to serve a page.
This commit is contained in:
parent
618f6575b2
commit
0e45767e67
@ -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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user