mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 04:07:11 +02:00
GeometryReader: We should delete the fbxGeometry if we've lost the resource.
This commit is contained in:
parent
865a77ae20
commit
07cfa13a82
1 changed files with 3 additions and 2 deletions
|
@ -144,10 +144,11 @@ void GeometryReader::run() {
|
|||
throw QString("unsupported format");
|
||||
}
|
||||
|
||||
// Ensure the resource has not been deleted, and won't be while invoke method is in flight.
|
||||
// Ensure the resource has not been deleted, and won't be while invokeMethod is in flight.
|
||||
auto resource = _resource.toStrongRef();
|
||||
if (!resource) {
|
||||
qCWarning(modelnetworking) << "Abandoning load of" << _url << "; could not get strong ref";
|
||||
delete fbxGeometry;
|
||||
} else {
|
||||
QMetaObject::invokeMethod(resource.data(), "setGeometryDefinition", Qt::BlockingQueuedConnection, Q_ARG(void*, fbxGeometry));
|
||||
}
|
||||
|
@ -159,7 +160,7 @@ void GeometryReader::run() {
|
|||
qCDebug(modelnetworking) << "Error reading " << _url << ": " << error;
|
||||
|
||||
auto resource = _resource.toStrongRef();
|
||||
// Ensure the resoruce has not been deleted, and won't be while invoke method is in flight.
|
||||
// Ensure the resoruce has not been deleted, and won't be while invokeMethod is in flight.
|
||||
if (!resource) {
|
||||
qCWarning(modelnetworking) << "Abandoning load of" << _url << "; could not get strong ref";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue