From 47e00761a2cf2038dc4f6216785a73f2428eb593 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 13 May 2014 19:12:10 +0200 Subject: [PATCH] + fix crash in SoBrepEdgeSet::renderSelection --- src/Mod/Part/Gui/SoBrepEdgeSet.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp index cf90e4a40b..a9b7ed1257 100644 --- a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp +++ b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp @@ -188,10 +188,13 @@ void SoBrepEdgeSet::renderSelection(SoGLRenderAction *action) SoMaterialBundle mb(action); mb.sendFirst(); // make sure we have the correct material - cindices = &(this->sl[0]); - numcindices = (int)this->sl.size(); + int num = (int)this->sl.size(); + if (num > 0) { + cindices = &(this->sl[0]); + numcindices = (int)this->sl.size(); - renderShape(static_cast(coords), cindices, numcindices); + renderShape(static_cast(coords), cindices, numcindices); + } state->pop(); }