summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2014-04-07 14:33:32 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-08 00:03:44 +0200
commit47d2ed915eebff7016fd99bec9c3d6187240edd6 (patch)
treea08eb509e02e9f70ad9ea48ac3c14be5f8f1471d
parent5ff2f4c52d77798063afbd2117ee1a06942f3612 (diff)
downloadqtmultimedia-47d2ed915eebff7016fd99bec9c3d6187240edd6.tar.gz
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 <christian.stromme@digia.com>
-rw-r--r--src/plugins/wmf/mfactivate.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}