Commit 80b341be authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix crash on importing c++ code.

parent 3383c450
......@@ -170,8 +170,13 @@ void CppTree2Uml::parseTypedef(TypedefAST* ast)
Import_Utils::createUMLObject(UMLObject::ot_Datatype, id,
m_currentNamespace[m_nsCnt]);
UMLDatatype *dt = typedefObj->asUMLDatatype();
dt->setIsReference();
dt->setOriginType(inner->asUMLClassifier());
if (dt) {
dt->setIsReference();
dt->setOriginType(inner->asUMLClassifier());
}
else {
uError() << "Could not create datatype from" << id;
}
} else {
Import_Utils::createUMLObject(UMLObject::ot_Class, id,
m_currentNamespace[m_nsCnt],
......
Supports Markdown
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