mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 23:15:14 -04:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user