summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-12-04 08:08:50 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-12-04 08:28:42 +0100
commite167148c3f3e3a76335e6920ae31b0282be23e8c (patch)
tree02fae340657cf5111319d8fb7b7d5b71a87f7058 /vcl
parentf5425301052357499a41d798c43c9f2c3306db4d (diff)
more asserts to detect double deletes
Change-Id: I54284d34db2446f28ba778ce26ebedb584bf2780
Diffstat (limited to 'vcl')
-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;
}