Commit 3fb0142d authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix coverity CID 88428: Dereference before null check

Null-checking attr suggests that it may be null, but it has already been
dereferenced on all paths leading to the check.

CCBUG:340646
parent d88258ee
......@@ -106,15 +106,12 @@ ParameterPropertiesDialog::ParameterPropertiesDialog(QWidget * parent, UMLDoc *
topLayout->addWidget(m_docWidget);
// Check the proper Kind radiobutton.
if (attr) {
Uml::ParameterDirection::Enum kind = attr->getParmKind();
if (kind == Uml::ParameterDirection::Out)
m_pOut->setChecked(true);
else if (kind == Uml::ParameterDirection::InOut)
m_pInOut->setChecked(true);
else
m_pIn->setChecked(true);
} else
Uml::ParameterDirection::Enum kind = attr->getParmKind();
if (kind == Uml::ParameterDirection::Out)
m_pOut->setChecked(true);
else if (kind == Uml::ParameterDirection::InOut)
m_pInOut->setChecked(true);
else
m_pIn->setChecked(true);
// set tab order
......
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