Commit fdd39b2f authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix coverity CID 88363: Unchecked dynamic_cast

Passing null pointer parentDoc to getParentClassifier, which
dereferences it.

parent 85798240
......@@ -51,6 +51,7 @@ void JavaClassDeclarationBlock::loadFromXMI1 (QDomElement & root)
void JavaClassDeclarationBlock::updateContent ()
JavaClassifierCodeDocument *parentDoc = dynamic_cast<JavaClassifierCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
CodeGenerationPolicy *commonPolicy = UMLApp::app()->commonPolicy();
QString endLine = commonPolicy->getNewLineEndingChars();
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