From 47d2ed915eebff7016fd99bec9c3d6187240edd6 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Mon, 7 Apr 2014 14:33:32 +0200 Subject: WMF: don't return undefined value in Release() function. The function was returning a member variable after the object was deleted. Return a local copy instead. Change-Id: I077e7e1c184ed0cfd4899a80c9147a2939c93cd7 Reviewed-by: Christian Stromme --- src/plugins/wmf/mfactivate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wmf/mfactivate.cpp b/src/plugins/wmf/mfactivate.cpp index cf64adc80..faa678ddf 100644 --- a/src/plugins/wmf/mfactivate.cpp +++ b/src/plugins/wmf/mfactivate.cpp @@ -85,5 +85,5 @@ ULONG MFAbstractActivate::Release(void) ULONG cRef = InterlockedDecrement(&m_cRef); if (cRef == 0) delete this; - return m_cRef; + return cRef; } -- cgit v1.2.1