Commit f06e3ccf authored by David Gobbi's avatar David Gobbi

Don't pass subject for Python DeleteEvent

When Python observed a VTK DeleteEvent, it called GetObjectFromPointer()
to try to get (or make) a Python object for the vtkObject that invoked
the event.  Obviously if a vtkObject is being deleted, we do not want to
create a new Python object that references it.
parent be7e8d24
Pipeline #33566 passed with stage
......@@ -104,7 +104,8 @@ void vtkPythonCommand::Execute(vtkObject *ptr, unsigned long eventtype,
PyObject * obj2 = NULL;
if (ptr && ptr->GetReferenceCount() > 0)
if (eventtype != vtkCommand::DeleteEvent &&
ptr && ptr->GetReferenceCount() > 0)
{
obj2 = vtkPythonUtil::GetObjectFromPointer(ptr);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment