From 8d7a34160dd748d029ecbbd6fd263650bdd4003c Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 22 Nov 2018 13:33:21 +0100 Subject: [PATCH] Fix of my previous commit. --- src/slic3r/GUI/GLCanvas3D.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 7a618436e..5f6bfa036 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3941,9 +3941,11 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re mvs->volume_idx = glvolumes_new.size(); glvolumes_new.emplace_back(volume); // Update color of the volume based on the current extruder. - int extruder_id = mvs->model_volume->extruder_id(); - if (extruder_id != -1) - volume->extruder_id = extruder_id; + if (mvs->model_volume != nullptr) { + int extruder_id = mvs->model_volume->extruder_id(); + if (extruder_id != -1) + volume->extruder_id = extruder_id; + } } } }