mirror of
https://github.com/YACReader/yacreader
synced 2025-09-10 15:25:12 -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)
|
void Render::load(const QString & path, int atPage)
|
||||||
{
|
{
|
||||||
createComic(path);
|
createComic(path);
|
||||||
loadComic(path,atPage);
|
if (comic !=0)
|
||||||
startLoad();
|
{
|
||||||
|
loadComic(path,atPage);
|
||||||
|
startLoad();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -636,8 +639,11 @@ void Render::load(const QString & path, const ComicDB & comicDB)
|
|||||||
filters[i]->setLevel(comicDB.info.gamma);
|
filters[i]->setLevel(comicDB.info.gamma);
|
||||||
}
|
}
|
||||||
createComic(path);
|
createComic(path);
|
||||||
loadComic(path,comicDB);
|
if (comic!=0)
|
||||||
startLoad();
|
{
|
||||||
|
loadComic(path,comicDB);
|
||||||
|
startLoad();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Render::createComic(const QString & path)
|
void Render::createComic(const QString & path)
|
||||||
|
Reference in New Issue
Block a user