summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_retain_ptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/cfx_retain_ptr.h')
-rw-r--r--core/fxcrt/cfx_retain_ptr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_retain_ptr.h b/core/fxcrt/cfx_retain_ptr.h
index f70faf1464..62b26942ba 100644
--- a/core/fxcrt/cfx_retain_ptr.h
+++ b/core/fxcrt/cfx_retain_ptr.h
@@ -83,6 +83,7 @@ class CFX_Retainable {
void Retain() { ++m_nRefCount; }
void Release() {
+ ASSERT(m_nRefCount > 0);
if (--m_nRefCount == 0)
delete this;
}