[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Thu Aug 31 20:38:02 UTC 2006
SVN commit 579329 by okellogg:
insertSubmodelAction(): Improve UMLFolder related diagnostics.
M +8 -3 listpopupmenu.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/listpopupmenu.cpp #579328:579329
@@ -639,11 +639,16 @@
}
UMLListView *listView = UMLApp::app()->getListView();
UMLListViewItem *current = static_cast<UMLListViewItem*>(listView->currentItem());
- UMLFolder *f = dynamic_cast<UMLFolder*>(current->getUMLObject());
+ UMLObject *o = current->getUMLObject();
+ if (o == NULL) {
+ kdError() << "ListPopupMenu::insertSubmodelAction: "
+ << current->getText() << " getUMLObject() returns NULL" << endl;
+ return;
+ }
+ UMLFolder *f = dynamic_cast<UMLFolder*>(o);
if (f == NULL) {
kdError() << "ListPopupMenu::insertSubmodelAction: "
- << "current->getUMLObject (" << current->getUMLObject()
- << ") is not a Folder" << endl;
+ << "current->getUMLObject (" << o->getName() << ") is not a Folder" << endl;
return;
}
QString submodelFile = f->getFolderFile();
More information about the umbrello-devel
mailing list