Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2020-07-28 15:14:16 +0300
committerYuSanka <yusanka@gmail.com>2020-07-28 15:14:16 +0300
commit3c3e463f50b646e2aa305d4aec911378872f9627 (patch)
tree732532b4a7bd58da689606737b90e0b6f0947569 /src/slic3r/GUI/GUI_ObjectList.cpp
parent68ae95509fc4410baa9069cb407b8bb756e2be10 (diff)
parent18594261d293651bf5f8234cfefe692e7709a103 (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.cpp5
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];