Use correct range for range check on iterator.

This commit is contained in:
Joseph Lenox 2018-05-11 23:07:07 -05:00 committed by Joseph Lenox
parent ef0dd3c7c9
commit e8f9940062

View File

@ -431,7 +431,8 @@ void Plater::select_object(ObjRef obj) {
o.selected = false;
o.selected_instance = -1;
}
if (obj >= this->objects.end() && obj < this->objects.begin()) {
// range check the iterator
if (obj < this->objects.end() && obj >= this->objects.begin()) {
obj->selected = true;
obj->selected_instance = 0;
}