From e8f99400621b7b494ec38a7d94bbc1bbe3b2dc5c Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Fri, 11 May 2018 23:07:07 -0500 Subject: [PATCH] Use correct range for range check on iterator. --- src/GUI/Plater.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GUI/Plater.cpp b/src/GUI/Plater.cpp index 499267e98..1b0a58db4 100644 --- a/src/GUI/Plater.cpp +++ b/src/GUI/Plater.cpp @@ -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; }