Merge pull request #14434 from sethalves/fix-throw-from-worker

catch QString exceptions that ModelCache can throw
This commit is contained in:
Jeff Clinton 2018-11-19 16:36:52 -08:00 committed by GitHub
commit 30051f75da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,6 +243,13 @@ void GeometryReader::run() {
QMetaObject::invokeMethod(resource.data(), "finishedLoading",
Q_ARG(bool, false));
}
} catch (QString& e) {
qCWarning(modelnetworking) << "Exception while loading model --" << e;
auto resource = _resource.toStrongRef();
if (resource) {
QMetaObject::invokeMethod(resource.data(), "finishedLoading",
Q_ARG(bool, false));
}
}
}