From 0c19d901889db50f75f64c946e97efa9c86100ee Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 11 Nov 2023 21:25:37 +0100 Subject: [PATCH] again --- source/common/objects/dobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/common/objects/dobject.h b/source/common/objects/dobject.h index 5e77d13d0a..149f4e090f 100644 --- a/source/common/objects/dobject.h +++ b/source/common/objects/dobject.h @@ -368,7 +368,8 @@ template T* Create(Args&&... args) { DObject::nonew nono; - T *object = new(nono) T(std::forward(args)...); + auto memory = M_Calloc(sizeof(T), 1); + T *object = ::new(memory) T(std::forward(args)...); if (object != nullptr) { object->SetClass(RUNTIME_CLASS(T));