diff options
Diffstat (limited to 'source/blender/io/common/intern/abstract_hierarchy_iterator.cc')
-rw-r--r-- | source/blender/io/common/intern/abstract_hierarchy_iterator.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc index 8c9245ef9b0..8e66c069e18 100644 --- a/source/blender/io/common/intern/abstract_hierarchy_iterator.cc +++ b/source/blender/io/common/intern/abstract_hierarchy_iterator.cc @@ -149,6 +149,12 @@ AbstractHierarchyIterator::AbstractHierarchyIterator(Depsgraph *depsgraph) AbstractHierarchyIterator::~AbstractHierarchyIterator() { + /* release_writers() cannot be called here directly, as it calls into the pure-virtual + * release_writer() function. By the time this destructor is called, the subclass that implements + * that pure-virtual function is already destructed. */ + BLI_assert( + writers_.empty() || + !"release_writers() should be called before the AbstractHierarchyIterator goes out of scope"); } void AbstractHierarchyIterator::iterate_and_write() |