summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/tabbar.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index ddadf400761d..1690269ba234 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -404,6 +404,12 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel, void )
ResetPostEvent();
maLoseFocusIdle.Stop();
+ // tdf#156958: when renaming and clicking on canvas, LO goes into GetParent()->EndEditMode first time
+ // then it calls TabBarEdit::dispose method which resets m_xEntry BUT, on the same thread, LO comes here again
+ // so return if already disposed to avoid a crash
+ if (isDisposed())
+ return;
+
// We need this query, because the edit gets a losefocus event,
// when it shows the context menu or the insert symbol dialog
if (!m_xEntry->has_focus() && m_xEntry->has_child_focus())