mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fix occasional deadlock in loading recordings
This commit is contained in:
parent
64ba5b4f14
commit
3738f21936
1 changed files with 6 additions and 4 deletions
|
@ -56,10 +56,12 @@ bool RecordingScriptingInterface::loadRecording(const QString& url) {
|
|||
using namespace recording;
|
||||
|
||||
auto loader = ClipCache::instance().getClipLoader(url);
|
||||
QEventLoop loop;
|
||||
QObject::connect(loader.data(), &Resource::loaded, &loop, &QEventLoop::quit);
|
||||
QObject::connect(loader.data(), &Resource::failed, &loop, &QEventLoop::quit);
|
||||
loop.exec();
|
||||
if (!loader->isLoaded()) {
|
||||
QEventLoop loop;
|
||||
QObject::connect(loader.data(), &Resource::loaded, &loop, &QEventLoop::quit);
|
||||
QObject::connect(loader.data(), &Resource::failed, &loop, &QEventLoop::quit);
|
||||
loop.exec();
|
||||
}
|
||||
|
||||
if (!loader->isLoaded()) {
|
||||
qWarning() << "Clip failed to load from " << url;
|
||||
|
|
Loading…
Reference in a new issue