Commit a30671e9 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Don't crash when closing an application before all resources are loaded

Thanks to slangkamp and smjert for the hints. It was so simple, in the
end...
parent 5f63304a
......@@ -128,11 +128,11 @@ KoResourceLoaderThread::KoResourceLoaderThread(KoResourceServerBase * server)
}
}
}
connect(qApp, SIGNAL(aboutToQuit()), SLOT(barrier()));
}
KoResourceLoaderThread::~KoResourceLoaderThread()
{
barrier();
}
void KoResourceLoaderThread::run()
......
......@@ -38,6 +38,7 @@
*/
class KOWIDGETS_EXPORT KoResourceLoaderThread : public QThread {
Q_OBJECT
public:
/**
......@@ -46,7 +47,7 @@ public:
*/
explicit KoResourceLoaderThread(KoResourceServerBase *server);
~KoResourceLoaderThread();
public slots:
/**
* Checks whether the thread has finished loading and waits
* until it is finished if necessary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment