From 2e290ea798254481fe7dd91af5916686a4543f29 Mon Sep 17 00:00:00 2001 From: sabrina-shanman Date: Fri, 31 Aug 2018 10:52:00 -0700 Subject: [PATCH] Only create a NestableTransformNode if the spatially nestable exists --- interface/src/raypick/PickScriptingInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/src/raypick/PickScriptingInterface.cpp b/interface/src/raypick/PickScriptingInterface.cpp index f551c0ec90..6dedf3fca1 100644 --- a/interface/src/raypick/PickScriptingInterface.cpp +++ b/interface/src/raypick/PickScriptingInterface.cpp @@ -373,7 +373,8 @@ std::shared_ptr PickScriptingInterface::createTransformNode(const if (propMap["parentJointIndex"].isValid()) { parentJointIndex = propMap["parentJointIndex"].toInt(); } - if (success && !nestablePointer.expired()) { + auto sharedNestablePointer = nestablePointer.lock(); + if (success && sharedNestablePointer) { return std::make_shared(nestablePointer, parentJointIndex); } }