summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2016-09-12 21:12:56 (GMT)
committerRalf Habacker <ralf.habacker@freenet.de>2016-09-12 21:12:56 (GMT)
commitc4389129412005b5c4ceb4ef683a2a5020e71e73 (patch)
tree39bff483cfcd11c782c60a09707e1fb8893b845a
parente1553eb3d71d28c1afd87d074330601e9f781144 (diff)
Fix coverity check CID 169652: 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 57011b7..45cab07 100644
--- a/umbrello/umllistview.cpp
+++ b/umbrello/umllistview.cpp
@@ -2145,6 +2145,8 @@ bool UMLListView::isExpandable(UMLListViewItem::ListViewType lvt)
void UMLListView::slotExpanded(QTreeWidgetItem * item)
{
UMLListViewItem * myItem = dynamic_cast<UMLListViewItem*>(item);
+ if (!myItem)
+ return;
if (isExpandable(myItem->type())) {
myItem->updateFolder();
}