Fix crash with recently added remove_on_cancel transform property, and hide this
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 17 Sep 2013 16:12:05 +0000 (16:12 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 17 Sep 2013 16:12:05 +0000 (16:12 +0000)
property in the user interface.

source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c

index ad572188f4c4ee452513d1b9899f934225470132..233ef1d18a574d86fd08a2848132aae75bf18cf6 100644 (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;
                }
index 53b43b6c9699d7712a0f8cdcf91524641b1d089e..e7c22fc0899f2a41cc704959d9da0022adb63cc4 100644 (file)
@@ -537,7 +537,8 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
 
        if (flags & P_OPTIONS) {
                RNA_def_boolean(ot->srna, "texture_space", 0, "Edit Texture Space", "Edit Object data texture space");
-               RNA_def_boolean(ot->srna, "remove_on_cancel", 0, "Remove on Cancel", "Remove elements on cancel");
+               prop = RNA_def_boolean(ot->srna, "remove_on_cancel", 0, "Remove on Cancel", "Remove elements on cancel");
+               RNA_def_property_flag(prop, PROP_HIDDEN);
        }
 
        if (flags & P_CORRECT_UV) {