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

Fix coverity CID 88360: Unchecked dynamic_cast

Passing null pointer parentDoc to getParentClassifier, which
dereferences it.

parent ea2b6aa1
......@@ -52,6 +52,7 @@ void RubyClassDeclarationBlock::loadFromXMI1 (QDomElement & root)
void RubyClassDeclarationBlock::updateContent ()
RubyClassifierCodeDocument *parentDoc = dynamic_cast<RubyClassifierCodeDocument*>(getParentDocument());
UMLClassifier *c = parentDoc->getParentClassifier();
CodeGenerationPolicy * p = UMLApp::app()->commonPolicy();
QString endLine = p->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