From f5887c77e910b1a4ecd798ec927d6e83a773b284 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 13 Jan 2005 12:26:13 -0500 Subject: [PATCH] BUG: fix for Bug #1466 delete cache leaves file button and can crash --- Source/MFCDialog/PropertyList.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp index 5ec7b4a90..259964a3e 100644 --- a/Source/MFCDialog/PropertyList.cpp +++ b/Source/MFCDialog/PropertyList.cpp @@ -448,6 +448,11 @@ void CPropertyList::OnCheckBox() void CPropertyList::OnButton() { + if(m_PropertyItems.size() == 0) + { + return; + } + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); // The dialogs might change the working directory. Save it. @@ -665,7 +670,8 @@ void CPropertyList::OnRButtonUp( UINT nFlags, CPoint point ) } void CPropertyList::RemoveProperty(const char* name) -{ +{ + this->HideControls(); for(int i =0; i < this->GetCount(); ++i) { CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(i);