issue #0002714: Segfault in PropertyLinkSubList::Save

This commit is contained in:
wmayer 2016-10-09 13:49:57 +02:00
parent f2a84b0364
commit a90907530f

View File

@ -52,7 +52,7 @@ using namespace std;
// PropertyLink // PropertyLink
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TYPESYSTEM_SOURCE(App::PropertyLink , App::Property); TYPESYSTEM_SOURCE(App::PropertyLink , App::Property)
//************************************************************************** //**************************************************************************
// Construction/Destruction // Construction/Destruction
@ -172,7 +172,7 @@ void PropertyLink::Paste(const Property &from)
// PropertyLinkList // PropertyLinkList
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TYPESYSTEM_SOURCE(App::PropertyLinkList, App::PropertyLists); TYPESYSTEM_SOURCE(App::PropertyLinkList, App::PropertyLists)
//************************************************************************** //**************************************************************************
// Construction/Destruction // Construction/Destruction
@ -328,7 +328,7 @@ unsigned int PropertyLinkList::getMemSize(void) const
// PropertyLinkSub // PropertyLinkSub
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TYPESYSTEM_SOURCE(App::PropertyLinkSub , App::Property); TYPESYSTEM_SOURCE(App::PropertyLinkSub , App::Property)
//************************************************************************** //**************************************************************************
// Construction/Destruction // Construction/Destruction
@ -515,7 +515,7 @@ void PropertyLinkSub::Paste(const Property &from)
// PropertyLinkSubList // PropertyLinkSubList
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TYPESYSTEM_SOURCE(App::PropertyLinkSubList , App::PropertyLists); TYPESYSTEM_SOURCE(App::PropertyLinkSubList , App::PropertyLists)
//************************************************************************** //**************************************************************************
// Construction/Destruction // Construction/Destruction
@ -586,12 +586,13 @@ void PropertyLinkSubList::setValues(const std::vector<DocumentObject*>& lValue,c
void PropertyLinkSubList::setValue(DocumentObject* lValue, const std::vector<string> &SubList) void PropertyLinkSubList::setValue(DocumentObject* lValue, const std::vector<string> &SubList)
{ {
aboutToSetValue(); aboutToSetValue();
int size = SubList.size(); std::size_t size = SubList.size();
this->_lValueList.clear(); this->_lValueList.clear();
if (size == 0) { if (size == 0) {
if (lValue) if (lValue) {
this->_lValueList.push_back(lValue); this->_lValueList.push_back(lValue);
this->_lSubList.clear(); this->_lSubList.push_back(std::string());
}
} }
else { else {
this->_lSubList = SubList; this->_lSubList = SubList;