mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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; \
|
return S_OK; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
#include <iostream>
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
template<typename... Base>
|
template<typename... Base>
|
||||||
@ -28,8 +28,10 @@ namespace dxvk {
|
|||||||
|
|
||||||
ULONG Release() {
|
ULONG Release() {
|
||||||
ULONG refCount = --m_refCount;
|
ULONG refCount = --m_refCount;
|
||||||
if (refCount == 0)
|
if (refCount == 0) {
|
||||||
|
refCount += 0x80000000u;
|
||||||
delete this;
|
delete this;
|
||||||
|
}
|
||||||
return refCount;
|
return refCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user