mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[com] Fixed crashes caused by reentrant Release()
This commit is contained in:
parent
2b86a2f1f3
commit
fa1ef8248e
1 changed files with 4 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue