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:
parent
2b86a2f1f3
commit
fa1ef8248e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user