Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_view3d / view3d_walk.c
index 68a40f3336872476564b933a37596ede6d522367..d4bb213e5c72a8b1b0abcc7f22994ee4ad1fba1f 100644 (file)
@@ -280,7 +280,7 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *ar, void *a
        int xoff, yoff;
        rctf viewborder;
 
-       if (walk->scene->camera) {
+       if (ED_view3d_cameracontrol_object_get(walk->v3d_camera_control)) {
                ED_view3d_calc_camera_border(walk->scene, walk->depsgraph, ar, walk->v3d, walk->rv3d, &viewborder, false);
                xoff = viewborder.xmin + BLI_rctf_size_x(&viewborder) * 0.5f;
                yoff = viewborder.ymin + BLI_rctf_size_y(&viewborder) * 0.5f;