Summary: | crash on deleting an attribute from properties dialog attribute page | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | John Ratke <jratke> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
John Ratke
2003-10-01 14:26:56 UTC
I looked at this closer and the problem is with m_pOldListItem, which appears to be used only to set the documentation on the previous item when changing items. When the delete happens, the item is removed from UMLDoc's objectList, so it is deleted. but m_pOldListItem still points to the memory so when slotClicked(0) is called it tries to setDoc on the deleted item. I will attach a proposed patch to set m_pOldListItem to 0 in slotDelete. This fix works for me. Here is the proposed patch: Index: classifierlistpage.cpp =================================================================== RCS file: /home/kde/kdesdk/umbrello/umbrello/dialogs/classifierlistpage.cpp,v retrieving revision 1.4 diff -u -3 -p -r1.4 classifierlistpage.cpp --- classifierlistpage.cpp 1 Oct 2003 03:07:08 -0000 1.4 +++ classifierlistpage.cpp 2 Oct 2003 01:09:42 -0000 @@ -346,6 +346,7 @@ void ClassifierListPage::slotDelete() { //but really shouldn't matter m_pDoc->removeUMLObject(selectedAttribute); m_pItemListLB->removeItem( m_pItemListLB->currentItem()); + m_pOldListItem = 0; slotClicked(0); } fixed by John Ratke |