Merging trunk up to r39145.
[blender-staging.git] / source / blender / editors / transform / transform_generics.c
index a43fc6a31e5d7d3835d4f2542ced827e7b0f17bf..8d6c56e5cce582e85493667be4dc5ffd42f16dc0 100644 (file)
@@ -911,6 +911,7 @@ void resetTransRestrictions(TransInfo *t)
        t->flag &= ~T_ALL_RESTRICTIONS;
 }
 
+/* the *op can be NULL */
 int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
 {
        Scene *sce = CTX_data_scene(C);
@@ -1039,7 +1040,7 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                }
 
                /* initialize UV transform from */
-               if (RNA_struct_find_property(op->ptr, "correct_uv")) {
+               if (op && RNA_struct_find_property(op->ptr, "correct_uv")) {
                        if(RNA_property_is_set(op->ptr, "correct_uv")) {
                                if(RNA_boolean_get(op->ptr, "correct_uv")) {
                                        t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT;