summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-04 08:08:50 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-04 08:09:44 +0100
commita09b0093ef7ab323b2f0ee06547ae4a258e7cd68 (patch)
tree7696fd2bd296e4871697409fd4a89baffb0381fe
parent85c8428797cfb047fea790e48e5a3260fcb83cc5 (diff)
more asserts to detect double deletes
Change-Id: I54284d34db2446f28ba778ce26ebedb584bf2780
-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 3a7a1fb3f169..108e78a1cbe7 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -129,11 +129,13 @@ OpenGLContext::~OpenGLContext()
void OpenGLContext::AddRef()
{
+ assert(mnRefCount > 0);
mnRefCount++;
}
void OpenGLContext::DeRef()
{
+ assert(mnRefCount > 0);
if( --mnRefCount == 0 )
delete this;
}