From a8229f879297cf59b0cc5ef4a0ef73231648147d Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Wed, 18 Jun 2025 18:53:02 +0200 Subject: [PATCH] [CORE] Fix copying of RefCountClass, RefCountValue --- Core/Libraries/Source/WWVegas/WWLib/refcount.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Core/Libraries/Source/WWVegas/WWLib/refcount.h b/Core/Libraries/Source/WWVegas/WWLib/refcount.h index c7d1a702936..6ee4f8f9b60 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/refcount.h +++ b/Core/Libraries/Source/WWVegas/WWLib/refcount.h @@ -123,6 +123,9 @@ class RefCountClass #endif } + /* + ** The reference counter value cannot be copied. + */ RefCountClass(const RefCountClass & ) : NumRefs(1) #ifndef NDEBUG @@ -135,6 +138,8 @@ class RefCountClass #endif } + RefCountClass& operator=(const RefCountClass&) { return *this; } + /* ** Add_Ref, call this function if you are going to keep a pointer ** to this object. @@ -280,6 +285,12 @@ class RefCountValue WWASSERT(NumRefs == IntegerType(0)); } + /* + ** The reference counter value cannot be copied. + */ + RefCountValue(const RefCountValue&) : NumRefs(1) {} + RefCountValue& operator=(const RefCountValue&) { return *this; } + /* ** Add_Ref, call this function if you are going to keep a pointer to this object. */