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

Fix coverity CID 88358: Unchecked dynamic_cast

Passing null pointer ccd to parentIsInterface, which dereferences it.

parent 223a2a31
......@@ -55,11 +55,13 @@ void CPPHeaderCodeOperation::updateContent()
void CPPHeaderCodeOperation::updateMethodDeclaration()
ClassifierCodeDocument *ccd = dynamic_cast<ClassifierCodeDocument*>(getParentDocument());
bool isInterface = ccd->parentIsInterface();
UMLOperation * o = getParentOperation();
CodeGenPolicyExt *pe = UMLApp::app()->policyExt();
CPPCodeGenerationPolicy * policy = dynamic_cast<CPPCodeGenerationPolicy*>(pe);
bool isInlineMethod = policy->getOperationsAreInline();
QString tag = policy->getDocToolTag();
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