[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
Oliver.Kellogg at t-online.de
Sat Sep 13 15:22:02 UTC 2003
CVS commit by okellogg:
getWidget{A,B}ID(): Guard against m_pWidget{A,B} being NULL.
M +8 -0 associationwidget.cpp 1.38
--- kdesdk/umbrello/umbrello/associationwidget.cpp #1.37:1.38
@@ -963,4 +963,8 @@ int AssociationWidget::getWidgetAID() co
if (m_pAssociation)
return m_pAssociation->getRoleAId();
+ if (m_pWidgetA == NULL) {
+ kdError() << "AssociationWidget::getWidgetAID(): m_pWidgetA is NULL" << endl;
+ return -1;
+ }
if (m_pWidgetA->getBaseType() == Uml::wt_Object)
return static_cast<ObjectWidget*>(m_pWidgetA)->getLocalID();
@@ -990,4 +994,8 @@ int AssociationWidget::getWidgetBID() co
if (m_pAssociation)
return m_pAssociation->getRoleBId();
+ if (m_pWidgetB == NULL) {
+ kdError() << "AssociationWidget::getWidgetBID(): m_pWidgetB is NULL" << endl;
+ return -1;
+ }
if (m_pWidgetB->getBaseType() == Uml::wt_Object)
return static_cast<ObjectWidget*>(m_pWidgetB)->getLocalID();
More information about the umbrello-devel
mailing list