summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2016-11-09 10:23:55 (GMT)
committerRalf Habacker <ralf.habacker@freenet.de>2016-11-09 10:26:15 (GMT)
commitdc6ff10cba26cafbed9fedf2134a81cf9a5ccaf0 (patch)
tree29bd27462885e5b15f94a4f1afdc566679dbceed
parent6963032b6081895d79f22d7675f56c60ed7b9199 (diff)
Check against zero pointer.
-rw-r--r--umbrello/umlscene.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/umbrello/umlscene.cpp b/umbrello/umlscene.cpp
index 6c0b283..e335775 100644
--- a/umbrello/umlscene.cpp
+++ b/umbrello/umlscene.cpp
@@ -1037,6 +1037,8 @@ void UMLScene::checkMessages(ObjectWidget * w)
UMLWidget* UMLScene::widgetOnDiagram(Uml::ID::Type id)
{
foreach(UMLWidget *obj, m_WidgetList) {
+ if (!obj)
+ continue;
UMLWidget* w = obj->widgetWithID(id);
if (w)
return w;
@@ -1062,6 +1064,8 @@ UMLWidget* UMLScene::widgetOnDiagram(Uml::ID::Type id)
UMLWidget * UMLScene::findWidget(Uml::ID::Type id)
{
foreach(UMLWidget* obj, m_WidgetList) {
+ if (!obj)
+ continue;
UMLWidget* w = obj->widgetWithID(id);
if (w) {
return w;