Use correct range for range check on iterator.

This commit is contained in:
Joseph Lenox 2018-05-11 23:07:07 -05:00
parent 1d4e5775ae
commit 13e8a1ea1a

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;
}