From 1af780a6645c82bfbb9dda23392a87a96fecb4df Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Thu, 10 Dec 2015 15:05:27 -0800 Subject: [PATCH] Fix for sixense debug draw after move to plugin. static variables used to hold a Singleton cannot be shared across dll boundaries by default. This uses the globalInstance template to store the instance as a property on the QApplication. --- libraries/shared/src/DebugDraw.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/shared/src/DebugDraw.cpp b/libraries/shared/src/DebugDraw.cpp index 3060e151c8..557889cab0 100644 --- a/libraries/shared/src/DebugDraw.cpp +++ b/libraries/shared/src/DebugDraw.cpp @@ -8,10 +8,11 @@ // #include "DebugDraw.h" +#include "SharedUtil.h" DebugDraw& DebugDraw::getInstance() { - static DebugDraw instance; - return instance; + static DebugDraw* instance = globalInstance("com.highfidelity.DebugDraw"); + return *instance; } DebugDraw::DebugDraw() {