summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 0ebca34859e5..d7a27981891f 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -128,11 +128,13 @@ OpenGLContext::~OpenGLContext()
void OpenGLContext::AddRef()
{
+ assert(mnRefCount > 0);
mnRefCount++;
}
void OpenGLContext::DeRef()
{
+ assert(mnRefCount > 0);
if( --mnRefCount == 0 )
delete this;
}