Fix T59387: Axis target crash
authorSebastian Parborg <zeddb>
Wed, 19 Dec 2018 19:32:51 +0000 (06:32 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 19 Dec 2018 19:33:55 +0000 (06:33 +1100)
source/blender/editors/object/object_transform.c

index 4ef0f62db728736051a67f02bb83ffb124b1ee7c..1620d1f82f94719ef2ec697f1baa745fb510c481 100644 (file)
@@ -1454,7 +1454,7 @@ static int object_transform_axis_target_invoke(bContext *C, wmOperator *op, cons
        ViewContext vc;
        ED_view3d_viewcontext_init(C, &vc);
 
-       if (!object_is_target_compat(vc.obact)) {
+       if (vc.obact == NULL || !object_is_target_compat(vc.obact)) {
                /* Falls back to texture space transform. */
                return OPERATOR_PASS_THROUGH;
        }