[Uml-devel] kdesdk/umbrello/umbrello

Sebastian Stein seb.kde at hpfsc.de
Fri Oct 3 14:57:11 UTC 2003


CVS commit by sstein: 

fix a compiler warning


  M +5 -1      listpopupmenu.cpp   1.35


--- kdesdk/umbrello/umbrello/listpopupmenu.cpp  #1.34:1.35
@@ -165,5 +165,5 @@ ListPopupMenu::ListPopupMenu(QWidget * p
         ActivityWidget *pActivity;
         ClassWidget *c;
-        InterfaceWidget *interfaceWidget;
+        InterfaceWidget *interfaceWidget = 0;
         UMLView * pView = static_cast<UMLView *>( parent );
         Uml::UMLWidget_Type type = object -> getBaseType();
@@ -214,4 +214,6 @@ ListPopupMenu::ListPopupMenu(QWidget * p
                                 case Uml::wt_Interface:
                                         interfaceWidget = static_cast<InterfaceWidget*>(object);
+                                        if (! interfaceWidget)
+                                                break;
                                         m_pShow = new KPopupMenu(this, "Show");
                                         m_pShow->setCheckable(true);
@@ -327,4 +329,6 @@ ListPopupMenu::ListPopupMenu(QWidget * p
                 case Uml::wt_Interface:
                         interfaceWidget = static_cast<InterfaceWidget*>(object);
+                        if (! interfaceWidget)
+                                break;
                         m_pInsert = new KPopupMenu(this,"New");
                         m_pInsert->insertItem(SmallIcon("source"), i18n("Operation"), mt_Operation);






More information about the umbrello-devel mailing list