diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-04-05 12:17:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-04-05 12:19:51 +0100 |
commit | 944bc0a3a33f21f59cb51a4391687ff1fe01dae9 (patch) | |
tree | 9763949b957541e92245ffd6dfcdf45147509062 /cui | |
parent | 2c82e5d304b56c1dd95d0f3dcafc9a36ce02b5f4 (diff) |
Resolves: fdo#62478 crash on tools->options->base->databases
Change-Id: Ic24c5f14f66a4059ce653df34321352adb50496f
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/dbregister.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index dfa2def97a82..cb93a9724147 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -235,7 +235,7 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet ) // restore column width rBar.SetItemSize( ITEMID_TYPE, aUserData.GetToken(0).ToInt32() ); - HeaderEndDrag_Impl( NULL ); + HeaderEndDrag_Impl( &rBar ); // restore sort direction sal_Bool bUp = (sal_Bool)(sal_uInt16)aUserData.GetToken(1).ToInt32(); HeaderBarItemBits nBits = rBar.GetItemBits(ITEMID_TYPE); @@ -251,7 +251,7 @@ void DbRegistrationOptionsPage::Reset( const SfxItemSet& rSet ) nBits |= HIB_UPARROW; } rBar.SetItemBits( ITEMID_TYPE, nBits ); - HeaderSelect_Impl( NULL ); + HeaderSelect_Impl( &rBar ); } } @@ -312,6 +312,8 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, EditHdl) IMPL_LINK( DbRegistrationOptionsPage, HeaderSelect_Impl, HeaderBar*, pBar ) { + assert(pBar); + if ( pBar && pBar->GetCurItemId() != ITEMID_TYPE ) return 0; @@ -341,6 +343,8 @@ IMPL_LINK( DbRegistrationOptionsPage, HeaderSelect_Impl, HeaderBar*, pBar ) IMPL_LINK( DbRegistrationOptionsPage, HeaderEndDrag_Impl, HeaderBar*, pBar ) { + assert(pBar); + if ( pBar && !pBar->GetCurItemId() ) return 0; |