[Bf-blender-cvs] [98e61078d36] vr_scene_inspection: Fix crash with some 3D View operators (e.g. Zoom to Border)

Julian Eisel noreply at git.blender.org
Mon Mar 16 11:22:36 CET 2020


Commit: 98e61078d36de96602c87765cbd0f5c930176723
Author: Julian Eisel
Date:   Sat Mar 14 23:09:34 2020 +0100
Branches: vr_scene_inspection
https://developer.blender.org/rB98e61078d36de96602c87765cbd0f5c930176723

Fix crash with some 3D View operators (e.g. Zoom to Border)

Would do a NULL-ptr dereference if the VR mirror option is enabled.

===================================================================

M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 1f1d4f42694..d9ead3411e4 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -835,7 +835,8 @@ void ED_view3d_draw_depth(Depsgraph *depsgraph, ARegion *region, View3D *v3d, bo
   UI_Theme_Store(&theme_state);
   UI_SetTheme(SPACE_VIEW3D, RGN_TYPE_WINDOW);
 
-  ED_view3d_draw_setup_view(NULL, NULL, depsgraph, scene, region, v3d, NULL, NULL, NULL);
+  ED_view3d_draw_setup_view(
+      G_MAIN->wm.first, NULL, depsgraph, scene, region, v3d, NULL, NULL, NULL);
 
   GPU_clear(GPU_DEPTH_BIT);



More information about the Bf-blender-cvs mailing list