X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FOpenGl%2FOpenGl_PrimitiveArray.cxx;h=b29d51e69fd069944ec695a0d262c3d678b2e3d6;hb=dd8a4ce929e8d6e36b39d1be5306804958bf934c;hpb=eeaaaefb6f5580107f7170c08fa036c071b2cf6e diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index 8bb73e8268..b29d51e69f 100755 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -17,7 +17,6 @@ // purpose or non-infringement. Please see the License for the specific terms // and conditions governing the rights and limitations under the License. - #include #include @@ -1552,7 +1551,10 @@ void OpenGl_PrimitiveArray::Release (const Handle(OpenGl_Context)& theContext) { if (!myVbos[anIter].IsNull()) { - theContext->DelayedRelease (myVbos[anIter]); + if (!theContext.IsNull()) + { + theContext->DelayedRelease (myVbos[anIter]); + } myVbos[anIter].Nullify(); } }