Fix T73399: Crash trying to move the origin of an empty.

Empty objects have no obdata, so we need to check for NULL id...
This commit is contained in:
Bastien Montagne
2020-01-27 11:46:01 +01:00
parent 7e8e7bfe69
commit 34c8ba6d3e

View File

@@ -306,6 +306,9 @@ struct XFormObjectData_MetaBall {
struct XFormObjectData *ED_object_data_xform_create_ex(ID *id, bool is_edit_mode)
{
struct XFormObjectData *xod_base = NULL;
if (id == NULL) {
return xod_base;
}
switch (GS(id->name)) {
case ID_ME: {
Mesh *me = (Mesh *)id;