Fix T78358: random crash editing shader nodes with textures
authorBrecht Van Lommel <brecht@blender.org>
Tue, 30 Jun 2020 14:58:19 +0000 (16:58 +0200)
committerBrecht Van Lommel <brecht@blender.org>
Tue, 30 Jun 2020 14:59:40 +0000 (16:59 +0200)
source/blender/editors/space_view3d/view3d_utils.c

index 377e8c58ba38c1ce7646b3717b76e8f3709b3e07..15d6a43d1050ffe7cbfe060842e82d308954afb4 100644 (file)
@@ -94,7 +94,7 @@ bool ED_view3d_has_workbench_in_texture_color(const Scene *scene,
     if (v3d->shading.color_type == V3D_SHADING_TEXTURE_COLOR) {
       return true;
     }
-    if (ob->mode == OB_MODE_TEXTURE_PAINT) {
+    if (ob && ob->mode == OB_MODE_TEXTURE_PAINT) {
       return true;
     }
   }