Commit 7298e955 authored by Ralf Habacker's avatar Ralf Habacker

Guard access to avoid a crash.

parent 96964095
......@@ -196,7 +196,10 @@ void UMLPackage::removeObject(UMLObject *pObject)
if (pObject->baseType() == UMLObject::ot_Association) {
UMLObject *o = const_cast<UMLObject*>(pObject);
UMLAssociation *assoc = o->asUMLAssociation();
removeAssocFromConcepts(assoc);
if (assoc)
removeAssocFromConcepts(assoc);
else
uError() << "invalid cast found";
}
if (m_objects.indexOf(pObject) == -1)
uDebug() << name() << " removeObject: object with id="
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment