[Bf-blender-cvs] [1d21e78a57a] usd-importer-T81257-merge: USD Import: stage reader validation and cleanup.
makowalski
noreply at git.blender.org
Fri Mar 12 03:01:41 CET 2021
Commit: 1d21e78a57a24412711bce005f70ff6b9494a44e
Author: makowalski
Date: Thu Mar 11 19:28:50 2021 -0500
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB1d21e78a57a24412711bce005f70ff6b9494a44e
USD Import: stage reader validation and cleanup.
Added USDStageReader validation and guard against null
stage in the USDStageReader destructor.
===================================================================
M source/blender/io/usd/intern/usd_reader_stage.cc
===================================================================
diff --git a/source/blender/io/usd/intern/usd_reader_stage.cc b/source/blender/io/usd/intern/usd_reader_stage.cc
index e9bd4a80641..cc52847592f 100644
--- a/source/blender/io/usd/intern/usd_reader_stage.cc
+++ b/source/blender/io/usd/intern/usd_reader_stage.cc
@@ -63,13 +63,14 @@ USDStageReader::~USDStageReader()
{
clear_readers();
- stage_->Unload();
+ if (stage_) {
+ stage_->Unload();
+ }
}
bool USDStageReader::valid() const
{
- // TODO: Implement
- return true;
+ return stage_;
}
/* Returns true if the given prim should be excluded from the
More information about the Bf-blender-cvs
mailing list