From 78b24c9ba70b36f3fbd5aaf3109f4a8c5255b428 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 8 Apr 2014 13:59:22 +0200 Subject: [PATCH] + fixes# 0001502: crash when using 'move' tool in part workbench --- src/Mod/Part/Gui/SoBrepEdgeSet.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp index ae725e86e..cf90e4a40 100644 --- a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp +++ b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp @@ -150,10 +150,11 @@ void SoBrepEdgeSet::renderHighlight(SoGLRenderAction *action) SoMaterialBundle mb(action); mb.sendFirst(); // make sure we have the correct material - const int32_t* id = &(this->hl[0]); int num = (int)this->hl.size(); - - renderShape(static_cast(coords), id, num); + if (num > 0) { + const int32_t* id = &(this->hl[0]); + renderShape(static_cast(coords), id, num); + } state->pop(); }