Fix memory leak, comics need to be in the right thread before deleting them.

This commit is contained in:
Luis Ángel San Martín
2018-04-24 21:01:38 +02:00
2 changed files with 29 additions and 29 deletions

View File

@ -417,7 +417,7 @@ Render::~Render()
{
if(comic!=0)
{
//comic->moveToThread(QApplication::instance()->thread());
comic->moveToThread(QApplication::instance()->thread());
comic->deleteLater();
}
@ -679,7 +679,7 @@ void Render::setComic(Comic * c)
{
if(comic !=0)
{
//comic->moveToThread(QApplication::instance()->thread());
comic->moveToThread(QApplication::instance()->thread());
comic->disconnect();
comic->deleteLater();
}