From: vsv Date: Wed, 28 Dec 2016 11:42:36 +0000 (+0300) Subject: Issue #1937: Check that VBO array is initialized X-Git-Tag: V_2.7.0~351^2~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a5e1d696acf3d11187bd2104d1b5e92c75a12ee0;p=modules%2Fshaper.git Issue #1937: Check that VBO array is initialized --- diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp index cb9e5990b..8a3a0fa7a 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp @@ -64,10 +64,13 @@ public: // Update points coordinate taking the viewer scale into account myObj->updateIfReadyToDisplay(MyDist * aScale); if (myIsVboInit) { - const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); - Handle(Graphic3d_Buffer) aAttr = myObj->myPntArray->Attributes(); - myVboAttribs->init(aCtx, 0, aAttr->NbElements, - aAttr->Data(), GL_NONE, aAttr->Stride); + if (myVboAttribs) { + const Handle(OpenGl_Context)& aCtx = theWorkspace->GetGlContext(); + Handle(Graphic3d_Buffer) aAttr = myObj->myPntArray->Attributes(); + myVboAttribs->init(aCtx, 0, aAttr->NbElements, + aAttr->Data(), GL_NONE, aAttr->Stride); + } else + myIsVboInit = false; } else { myAttribs = myObj->myPntArray->Attributes(); myIndices = myObj->myPntArray->Indices();