summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-15 11:47:57 +0000
committerXisco Fauli <xiscofauli@libreoffice.org>2021-01-15 19:09:35 +0100
commit994b4232f114f8d75cb32a5b1e701b6c78fd9be4 (patch)
tree7d75d47c4886278e9bb198a35e7b94e257493331
parent37dff3f325c79163ff12a306e7ad15dc510ae16d (diff)
Resolves: rhbz#1916640 pFocusWin can be null
Change-Id: Ib901b1d849b2e54c61bd3e8626eb8262e73b832d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109359 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sfx2/source/sidebar/TabBar.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 4f49bd461364..47c59f15ec32 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -302,8 +302,8 @@ Image TabBar::GetItemImage(const DeckDescriptor& rDeckDescriptor) const
IMPL_LINK_NOARG(TabBar::Item, HandleClick, Button*, void)
{
- vcl::Window* pFocusWin = Application::GetFocusWindow();
- pFocusWin->GrabFocusToDocument();
+ if (vcl::Window* pFocusWin = Application::GetFocusWindow())
+ pFocusWin->GrabFocusToDocument();
try
{
maDeckActivationFunctor(msDeckId);