diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-05 16:25:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-05 16:36:30 +0000 |
commit | 0c3211b1f20383b4fbee8978e88c21e498e35047 (patch) | |
tree | dda4e4ebbc627ece437824e47093868ec3f3a386 /svtools | |
parent | a0a903892ca93615c1460cebbfbac579999233f2 (diff) |
crash on exit from xml form document with accessibility enabled
Change-Id: If60075b939569cf339f7ccf7e39e513fbe1f74bf
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/treelist.cxx | 6 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 8500425ce82d..4cac34b39e05 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -1472,7 +1472,8 @@ sal_Bool SvListView::IsSelected( SvTreeListEntry* pEntry ) const { DBG_ASSERT(pEntry,"IsExpanded:No Entry"); SvDataTable::const_iterator itr = maDataTable.find(pEntry ); - DBG_ASSERT(itr != maDataTable.end(),"Entry not in Table"); + if (itr == maDataTable.end()) + return false; return itr->second->IsSelected(); } @@ -1487,7 +1488,8 @@ void SvListView::SetEntryFocus( SvTreeListEntry* pEntry, sal_Bool bFocus ) const SvViewDataEntry* SvListView::GetViewData( const SvTreeListEntry* pEntry ) const { SvDataTable::const_iterator itr = maDataTable.find( const_cast<SvTreeListEntry*>(pEntry) ); - DBG_ASSERT(itr != maDataTable.end(),"Entry not in model or wrong view"); + if (itr == maDataTable.end()) + return NULL; return itr->second; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 661e109325b4..1602cd37d69a 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -4081,8 +4081,8 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvTreeListEntry* pEntry, ::utl: SvViewDataEntry* pViewDataNewCur = 0; if( pEntry ) { - pViewDataNewCur= GetViewDataEntry(pEntry); - if(pViewDataNewCur->HasFocus()) + pViewDataNewCur = GetViewDataEntry(pEntry); + if (pViewDataNewCur && pViewDataNewCur->HasFocus()) rStateSet.AddState( AccessibleStateType::FOCUSED ); } } |