From 7d91ff06a3625fe1fb2e0aae62d009cf02f39800 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 1 Jun 2019 22:12:32 +0200 Subject: [PATCH] [util] Fix return value of AddRef We're supposed to return the new ref count, not the old one. --- src/util/com/com_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/com/com_object.h b/src/util/com/com_object.h index 7f6ec256..1d277213 100644 --- a/src/util/com/com_object.h +++ b/src/util/com/com_object.h @@ -33,7 +33,7 @@ namespace dxvk { ULONG refCount = m_refCount++; if (refCount == 0ul) AddRefPrivate(); - return refCount; + return refCount + 1; } ULONG STDMETHODCALLTYPE Release() {