summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-01-13 17:26:13 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-01-13 17:26:13 (GMT)
commitf5887c77e910b1a4ecd798ec927d6e83a773b284 (patch)
treef4b57739baf17ec3ced5ad55b251644a50c02d54 /Source/MFCDialog
parent2ff66ba5c6a1922cdf135f6483387127d9ea9765 (diff)
downloadCMake-f5887c77e910b1a4ecd798ec927d6e83a773b284.zip
CMake-f5887c77e910b1a4ecd798ec927d6e83a773b284.tar.gz
CMake-f5887c77e910b1a4ecd798ec927d6e83a773b284.tar.bz2
BUG: fix for Bug #1466 delete cache leaves file button and can crash
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r--Source/MFCDialog/PropertyList.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp
index 5ec7b4a..259964a 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);