diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp
index e456beef83be6e9faae638dccc4884a8b3c89167..86c7a6670ff387a4d6be0364d0b19b5d1551b074 100644
--- a/Graphics/drawContext.cpp
+++ b/Graphics/drawContext.cpp
@@ -836,16 +836,16 @@ bool drawContext::select(int type, bool multiple, bool mesh,
     //   for triangle, 4 for quad) and the fourth is the index of the element in
     //   the vertex array
     GLuint names = *ptr++;
-    ptr++; // mindepth
+    GLuint mindepth = *ptr++;
     GLuint maxdepth = *ptr++;
     if(names == 2){
-      GLuint depth = maxdepth;
+      GLuint depth = maxdepth + 0 * mindepth; // could do something with mindepth
       GLuint type = *ptr++;
       GLuint ient = *ptr++;
       hits.push_back(hit(type, ient, depth));
     }
     else if(names == 4){
-      GLuint depth = maxdepth;
+      GLuint depth = maxdepth+ 0 * mindepth; // could do something with mindepth
       GLuint type = *ptr++;
       GLuint ient = *ptr++;
       GLuint type2 = *ptr++;