diff options
author | YuSanka <yusanka@gmail.com> | 2020-07-28 15:14:16 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2020-07-28 15:14:16 +0300 |
commit | 3c3e463f50b646e2aa305d4aec911378872f9627 (patch) | |
tree | 732532b4a7bd58da689606737b90e0b6f0947569 /src/slic3r/GUI/GUI_ObjectList.cpp | |
parent | 68ae95509fc4410baa9069cb407b8bb756e2be10 (diff) | |
parent | 18594261d293651bf5f8234cfefe692e7709a103 (diff) |
Merge remote-tracking branch 'origin/master' into ys_ph_printers
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectList.cpp')
-rw-r--r-- | src/slic3r/GUI/GUI_ObjectList.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index a9fd6ac7d..9d6b2b9cb 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -2361,8 +2361,9 @@ void ObjectList::del_layers_from_object(const int obj_idx) bool ObjectList::del_subobject_from_object(const int obj_idx, const int idx, const int type) { - if (obj_idx == 1000) - // Cannot delete a wipe tower. + assert(idx >= 0); + if (obj_idx == 1000 || idx<0) + // Cannot delete a wipe tower or volume with negative id return false; ModelObject* object = (*m_objects)[obj_idx]; |