Merge pull request #4801 from jakrams/fbx-out-of-memory-fix

Don't hide out-of-memory during FBX import
This commit is contained in:
Kim Kulling
2022-11-18 20:40:59 +01:00
committed by GitHub

View File

@@ -199,6 +199,14 @@ const Object* LazyObject::Get(bool dieOnError) {
object.reset(new AnimationCurveNode(id,element,name,doc));
}
}
catch (std::bad_alloc&) {
// out-of-memory is unrecoverable and should always lead to a failure
flags &= ~BEING_CONSTRUCTED;
flags |= FAILED_TO_CONSTRUCT;
throw;
}
catch(std::exception& ex) {
flags &= ~BEING_CONSTRUCTED;
flags |= FAILED_TO_CONSTRUCT;