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

Fix coverity check CID 173355: Unchecked dynamic_cast

Passing null pointer dynamic_cast <ClassifierWidget *>(object)
to makeClassifierPopup, which dereferences it.

CCBUG:340646
parent 50a4f787
......@@ -419,9 +419,12 @@ void ListPopupMenu::insertSingleSelectionMenu(WidgetBase* object)
}
case WidgetBase::wt_Class:
case WidgetBase::wt_Interface:
makeClassifierPopup(static_cast<ClassifierWidget*>(object));
{
ClassifierWidget* classifier = object->asClassifierWidget();
if (classifier)
makeClassifierPopup(classifier);
}
break;
case WidgetBase::wt_Enum:
insertSubMenuNew(mt_Enum);
insertSubMenuColor(object->useFillColor());
......
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