forked from bartvdbraak/blender
Fix T39833: Nurbs Crash
Converting empty object to mesh can generate a 'Null' BL:Mesh, we have to check against it.
This commit is contained in:
parent
9b0ab89067
commit
0e2f6c7fc4
@ -43,10 +43,12 @@ void python_thread_state_restore(void **python_thread_state);
|
||||
static inline BL::Mesh object_to_mesh(BL::BlendData data, BL::Object object, BL::Scene scene, bool apply_modifiers, bool render, bool calc_undeformed)
|
||||
{
|
||||
BL::Mesh me = data.meshes.new_from_object(scene, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed);
|
||||
if (me.use_auto_smooth()) {
|
||||
me.calc_normals_split(me.auto_smooth_angle());
|
||||
if ((bool)me) {
|
||||
if (me.use_auto_smooth()) {
|
||||
me.calc_normals_split(me.auto_smooth_angle());
|
||||
}
|
||||
me.calc_tessface();
|
||||
}
|
||||
me.calc_tessface();
|
||||
return me;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user