1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 10:54:16 +01:00

[com] Fixed crashes caused by reentrant Release()

This commit is contained in:
Philip Rebohle 2017-12-09 22:20:40 +01:00
parent 2b86a2f1f3
commit fa1ef8248e

View File

@ -12,7 +12,7 @@
return S_OK; \
} \
} while (0)
#include <iostream>
namespace dxvk {
template<typename... Base>
@ -28,8 +28,10 @@ namespace dxvk {
ULONG Release() {
ULONG refCount = --m_refCount;
if (refCount == 0)
if (refCount == 0) {
refCount += 0x80000000u;
delete this;
}
return refCount;
}