Fix bad poll function for constraints in liboverrides.

This commit is contained in:
Bastien Montagne
2020-06-11 12:01:20 +02:00
parent 95aa8ffed5
commit 9385d887d1

View File

@@ -678,7 +678,7 @@ static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
return 0;
}
if (ID_IS_OVERRIDE_LIBRARY(ob)) {
if (ID_IS_OVERRIDE_LIBRARY(ob) && ptr.data != NULL) {
CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints coming from library override");
return (((bConstraint *)ptr.data)->flag & CONSTRAINT_OVERRIDE_LIBRARY_LOCAL) != 0;
}