summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2016-09-12 21:13:40 (GMT)
committerRalf Habacker <ralf.habacker@freenet.de>2016-09-12 21:13:40 (GMT)
commit86e3b8cb5d4a9b91ac13266fd001dad3424cf3a6 (patch)
treec99a673df6bb9cc16f7bff5fad268517ed60edf3
parentc4389129412005b5c4ceb4ef683a2a5020e71e73 (diff)
Fix coverity check CID 169653: Null pointer dereferences (FORWARD_NULL)
Assigning: "myItem" = "dynamic_cast <UMLListViewItem *>(item)". CCBUG:340646
-rw-r--r--umbrello/umllistview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/umbrello/umllistview.cpp b/umbrello/umllistview.cpp
index 45cab07..26a2cf6 100644
--- a/umbrello/umllistview.cpp
+++ b/umbrello/umllistview.cpp
@@ -2158,6 +2158,8 @@ void UMLListView::slotExpanded(QTreeWidgetItem * item)
void UMLListView::slotCollapsed(QTreeWidgetItem * item)
{
UMLListViewItem * myItem = dynamic_cast<UMLListViewItem*>(item);
+ if (!myItem)
+ return;
if (isExpandable(myItem->type())) {
myItem->updateFolder();
}