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

Crash fix on java import.

For currently unknown reason a ClassifierWidget instance may
have an associated UMLPackage object instead of an UMLClassifier
object. Casting the UMLPackage instance to UMLClassifier
returns a zero pointer, which has to be guarded.
parent 11f59ca7
......@@ -389,7 +389,10 @@ void ClassifierWidget::toggleShowAttSigs()
int ClassifierWidget::displayedMembers(UMLObject::ObjectType ot)
{
int count = 0;
UMLClassifierListItemList list = classifier()->getFilteredList(ot);
UMLClassifier *classifier = this->classifier();
if (!classifier)
return count;
UMLClassifierListItemList list = classifier->getFilteredList(ot);
foreach (UMLClassifierListItem *m, list) {
if (!(visualProperty(ShowPublicOnly) && m->visibility() != Uml::Visibility::Public))
count++;
......
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