Added check in Tree.cpp DocumentItem::slotChangeObject to check for invalid pointers returned by claimChildren()
This commit is contained in:
committed by
Stefan Tröger
parent
d13560bea5
commit
0e6cdbe397
@@ -2294,6 +2294,16 @@ DocumentObject * Document::getObject(const char *Name) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Note: This method is only used in Tree.cpp slotChangeObject(), see explanation there
|
||||
const bool Document::isIn(const DocumentObject *pFeat) const
|
||||
{
|
||||
for (std::map<std::string,DocumentObject*>::const_iterator o = d->objectMap.begin(); o != d->objectMap.end(); o++)
|
||||
if (o->second == pFeat)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const char * Document::getObjectName(DocumentObject *pFeat) const
|
||||
{
|
||||
std::map<std::string,DocumentObject*>::const_iterator pos;
|
||||
|
||||
Reference in New Issue
Block a user