[Bf-blender-cvs] [90c6674f281] master: Fix T102615: crash on USD export for scenes with point clouds or hair
Michael Kowalski
noreply at git.blender.org
Thu Jan 19 16:58:22 CET 2023
Commit: 90c6674f281bdf064b2c9607d3b07777f81f41ef
Author: Michael Kowalski
Date: Thu Jan 19 10:57:22 2023 -0500
Branches: master
https://developer.blender.org/rB90c6674f281bdf064b2c9607d3b07777f81f41ef
Fix T102615: crash on USD export for scenes with point clouds or hair
Code authored by Michael B Johnson (drwave).
Reviewed by Sybren and makowalski.
This patch addresses a crash that occurs when exporting a
scene to a USD file, when that scene includes a point cloud
object or hair.
Added OB_POINTCLOUD and OB_CURVES enums and a default case
statement in the switch statement in
USDHierarchyIterator::create_data_writer, to avoid dereferencing
a NULL pointer.
Differential Revision: https://developer.blender.org/D16776
===================================================================
M source/blender/io/usd/intern/usd_hierarchy_iterator.cc
===================================================================
diff --git a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc
index fbfda975055..abf6c0cb0f9 100644
--- a/source/blender/io/usd/intern/usd_hierarchy_iterator.cc
+++ b/source/blender/io/usd/intern/usd_hierarchy_iterator.cc
@@ -118,10 +118,15 @@ AbstractHierarchyWriter *USDHierarchyIterator::create_data_writer(const Hierarch
case OB_LATTICE:
case OB_ARMATURE:
case OB_GPENCIL:
+ case OB_POINTCLOUD:
+ case OB_CURVES:
return nullptr;
case OB_TYPE_MAX:
BLI_assert_msg(0, "OB_TYPE_MAX should not be used");
return nullptr;
+ default:
+ BLI_assert_unreachable();
+ return nullptr;
}
if (!data_writer->is_supported(context)) {
More information about the Bf-blender-cvs
mailing list