From baf4a82269fc528bbd39b0922a4ea5fd33561527 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Fri, 27 Jun 2014 09:56:03 -0700 Subject: [PATCH] Fix crash occuring when geometry not yet available --- libraries/models/src/ModelTreeElement.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/models/src/ModelTreeElement.cpp b/libraries/models/src/ModelTreeElement.cpp index c9e5f0f309..960d1dd4cb 100644 --- a/libraries/models/src/ModelTreeElement.cpp +++ b/libraries/models/src/ModelTreeElement.cpp @@ -330,7 +330,9 @@ bool ModelTreeElement::updateModel(const ModelItemID& modelID, const ModelItemPr } if (found) { thisModel.setProperties(properties); - thisModel.setSittingPoints(_myTree->getGeometryForModel(thisModel)->sittingPoints); + if (_myTree->getGeometryForModel(thisModel)) { + thisModel.setSittingPoints(_myTree->getGeometryForModel(thisModel)->sittingPoints); + } markWithChangedTime(); // mark our element as changed.. const bool wantDebug = false; if (wantDebug) {