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>
This commit is contained in:
Yoann Lopes
2014-04-07 14:33:32 +02:00
committed by The Qt Project
parent 5ff2f4c52d
commit 47d2ed915e

View File

@@ -85,5 +85,5 @@ ULONG MFAbstractActivate::Release(void)
ULONG cRef = InterlockedDecrement(&m_cRef);
if (cRef == 0)
delete this;
return m_cRef;
return cRef;
}