Page MenuHome

Fix T96888: data transfer operator crash in certain situation
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Apr 5 2022, 10:03 AM.

Details

Summary

The operator could crash in case the context "object" was overridden
from python, but the "active_object" wasnt (and the active object was
not a mesh).

Reason for the crash is a mismatch in the operators poll function
data_transfer_poll vs. dt_layers_select_src_itemf -- in the former,
the overriden "object" was respected (and if this was a mesh, the poll
was permissive), in the later it wasnt and only the "active_object" was
used (if this was not a mesh, a crash would happen trying to get an
evaluated mesh).

Now rectify how the object which is used is being fetched -> use
ED_object_active_context everywhere (see also rBe560bbe1d584).

Diff Detail

Repository
rB Blender