Skip to content

Commit 938b891

Browse files
author
Roberto De Ioris
committed
fixed physics simulation enabling
1 parent 19ce63e commit 938b891

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Source/UnrealEnginePython/Private/UEPyModule.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,8 @@ static PyObject *py_ue_set_simulate_physics(ue_PyUObject * self, PyObject * args
10801080
AActor *actor = (AActor *)self->ue_object;
10811081
primitive = (UPrimitiveComponent *)actor->GetComponentByClass(UPrimitiveComponent::StaticClass());
10821082
}
1083-
else {
1083+
1084+
if (!primitive)
10841085
return PyErr_Format(PyExc_Exception, "unable to set physics for the object");
10851086
}
10861087

0 commit comments

Comments
 (0)