Initial fix for racing condition in code for detecting first/last page of a comic that could lead to crashes.

This commit is contained in:
Felix Kauselmann 2015-02-23 14:14:22 +01:00
parent 6d3c7e4d83
commit cd9adbb00a

View File

@ -849,7 +849,7 @@ void Render::nextPage()
update();
emit pageChanged(currentIndex);
}
else
else if (hasLoadedComic() && (currentIndex == numPages()-1))
{
emit isLast();
}
@ -873,7 +873,7 @@ void Render::nextDoublePage()
update();
emit pageChanged(currentIndex);
}
else
else if (hasLoadedComic() && (currentIndex >= numPages()-2))
{
emit isLast();
}
@ -894,7 +894,7 @@ void Render::previousPage()
update();
emit pageChanged(currentIndex);
}
else
else if (hasLoadedComic() && (currentIndex == 0))
{
emit isCover();
}