summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-05-02 00:19:50 +0300
committerCaolán McNamara <caolanm@redhat.com>2016-05-10 08:41:31 +0000
commit3f0635b3506c0825aac53d5b586689a2f6b5b4fc (patch)
tree00182ecce4b28cf931735a4b35ec8023fa5ba016 /svx
parent4962e13d358f3389e81ceb585d73d41a6a78eebd (diff)
tdf#99338 Fix GrabFocus during dispose crashes
Change-Id: I309e1e5f0d28c408c8a95190bf645abf680491b6 (cherry picked from commit 097bf754c09e8b1ba57e3367baa010898611b61b) Reviewed-on: https://gerrit.libreoffice.org/24794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/tbxctrls/linectrl.cxx3
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx
index 6f66d5cd4226..314b95fc3efa 100644
--- a/svx/source/tbxctrls/linectrl.cxx
+++ b/svx/source/tbxctrls/linectrl.cxx
@@ -595,7 +595,8 @@ void SvxLineEndWindow::GetFocus()
SfxPopupWindow::GetFocus();
// Grab the focus to the line ends value set so that it can be controlled
// with the keyboard.
- aLineEndSet->GrabFocus();
+ if ( aLineEndSet )
+ aLineEndSet->GrabFocus();
}
SvxLineEndToolBoxControl::SvxLineEndToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) :
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index ce7d8777273b..e850661720fb 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1943,7 +1943,8 @@ vcl::Window* SvxLineWindow_Impl::GetPreferredKeyInputWindow()
void SvxLineWindow_Impl::GetFocus()
{
- m_aLineStyleLb->GrabFocus();
+ if ( m_aLineStyleLb )
+ m_aLineStyleLb->GrabFocus();
}
void SvxLineWindow_Impl::DataChanged( const DataChangedEvent& rDCEvt )