mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -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();
|
comicFile = ySession->getCurrentComic();
|
||||||
currentComicId = ySession->getCurrentComicId();
|
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())
|
if(currentComicId != 0 && !QPointer<Comic>(comicFile).isNull())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user