Don't attempt attempt to render a comic we were unable load.

Fixes segfaults occuring when supplying YACReader with non-existent or
faulty paths.
This commit is contained in:
Felix Kauselmann
2014-08-08 21:04:34 +02:00
parent 1f4f524397
commit 2c0703fba5

View File

@ -609,8 +609,11 @@ void Render::update()
void Render::load(const QString & path, int atPage)
{
createComic(path);
loadComic(path,atPage);
startLoad();
if (comic !=0)
{
loadComic(path,atPage);
startLoad();
}
}
//-----------------------------------------------------------------------------
@ -636,8 +639,11 @@ void Render::load(const QString & path, const ComicDB & comicDB)
filters[i]->setLevel(comicDB.info.gamma);
}
createComic(path);
loadComic(path,comicDB);
startLoad();
if (comic!=0)
{
loadComic(path,comicDB);
startLoad();
}
}
void Render::createComic(const QString & path)