Fix crash with recently added remove_on_cancel transform property, and hide this

property in the user interface.
This commit is contained in:
2013-09-17 16:12:05 +00:00
parent 5aeade4c60
commit 394efd85bd
2 changed files with 4 additions and 2 deletions

View File

@@ -1106,7 +1106,8 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
}
t->remove_on_cancel = false;
if ((prop = RNA_struct_find_property(op->ptr, "remove_on_cancel")) && RNA_property_is_set(op->ptr, prop)) {
if (op && (prop = RNA_struct_find_property(op->ptr, "remove_on_cancel")) && RNA_property_is_set(op->ptr, prop)) {
if (RNA_property_boolean_get(op->ptr, prop)) {
t->remove_on_cancel = true;
}