diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-07-08 13:48:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-07-12 10:02:45 +0200 |
commit | 5bbc018edd51634e659373b0815dde6f9e9184df (patch) | |
tree | 4513386363e8e251264155c144b62fde466d5efb | |
parent | Resolves: tdf#143165 Date input must match separator, D,M,Y not part of (diff) | |
download | core-5bbc018edd51634e659373b0815dde6f9e9184df.tar.gz core-5bbc018edd51634e659373b0815dde6f9e9184df.zip |
tdf#143146 copy functor and arg before calling function that can delete this
Change-Id: I4e29fe6fa4119b709e31156afc5c2a5d08cdc072
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118625
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 80f5f74b661b52717ec2848b98cad3be8192b330)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118629
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sfx2/source/sidebar/TabBar.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 8164c3e34884..881ec8f78fc2 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -248,13 +248,17 @@ TabBar::Item::~Item() mrTabBar.GetContainer()->move(mxButton.get(), nullptr); } - IMPL_LINK_NOARG(TabBar::Item, HandleClick, const OString&, void) { + // tdf#143146 copy the functor and arg before calling + // GrabFocusToDocument which may destroy this object + auto aDeckActivationFunctor = maDeckActivationFunctor; + auto sDeckId = msDeckId; + mrTabBar.GrabFocusToDocument(); try { - maDeckActivationFunctor(msDeckId); + aDeckActivationFunctor(sDeckId); } catch(const css::uno::Exception&) {} // workaround for #i123198# |