From 0dbd8154c815953af0e39dca32e80619e8274716 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 1 Mar 2016 11:24:47 +0300 Subject: [PATCH] Improve stability for issue #1346 --- src/Model/Model_AttributeSelectionList.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index b3c39a76d..a51cfae97 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -147,8 +147,10 @@ bool Model_AttributeSelectionList::isInList(const ResultPtr& theContext, { for(int anIndex = size() - 1; anIndex >= 0; anIndex--) { AttributeSelectionPtr anAttr = value(anIndex); - if (anAttr->context() == theContext && anAttr->value()->isEqual(theSubShape)) - return true; + if (anAttr.get() && anAttr->value().get()) { + if (anAttr->context() == theContext && anAttr->value()->isEqual(theSubShape)) + return true; + } } return false; } -- 2.39.2