summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/ImageDataObject.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/ImageDataObject.h')
-rw-r--r--plugins/TabSRMM/src/ImageDataObject.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/ImageDataObject.h b/plugins/TabSRMM/src/ImageDataObject.h
index f05df9fa69..2601c10dc6 100644
--- a/plugins/TabSRMM/src/ImageDataObject.h
+++ b/plugins/TabSRMM/src/ImageDataObject.h
@@ -68,9 +68,11 @@ public:
STDMETHOD_(ULONG, Release)(void)
{
- m_ulRefCnt--;
- if (m_ulRefCnt == 0)
+ m_ulRefCnt--;
+ if (m_ulRefCnt == 0) {
delete this;
+ return 0;
+ }
return m_ulRefCnt;
}