summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-12-14 14:28:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-12-14 19:38:59 +0000
commite5d68c4a4ad953d4d7d99103ee2181be38cd025b (patch)
tree5582eed639293b9e495f77b41e6b1dca4f8f5a8c /svx/source
parent040867fce9a992b34813dab3a4d7ab93ebccbe11 (diff)
Resolves: tdf#152495 crash on dismissing ruby dialog with ESC
Change-Id: I26af008a7ee7b105255a1aaacff7ff30813172a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/rubydialog.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 4059e8d35c8c..3fefb5e74641 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -83,6 +83,7 @@ class SvxRubyData_Impl : public cppu::WeakImplHelper<css::view::XSelectionChange
Sequence<PropertyValues> aRubyValues;
Reference<XController> xController;
bool bHasSelectionChanged;
+ bool bDisposing;
public:
SvxRubyData_Impl();
@@ -98,6 +99,7 @@ public:
return xModel;
}
bool HasSelectionChanged() const { return bHasSelectionChanged; }
+ bool IsDisposing() const { return bDisposing; }
Reference<XRubySelection> const& GetRubySelection()
{
xSelection.set(xController, UNO_QUERY);
@@ -120,6 +122,7 @@ public:
SvxRubyData_Impl::SvxRubyData_Impl()
: bHasSelectionChanged(false)
+ , bDisposing(false)
{
}
@@ -161,6 +164,7 @@ void SvxRubyData_Impl::disposing(const EventObject&)
{
}
xController = nullptr;
+ bDisposing = true;
}
void SvxRubyData_Impl::AssertOneEntry()
@@ -269,9 +273,9 @@ void SvxRubyDialog::Close()
void SvxRubyDialog::Activate()
{
SfxModelessDialogController::Activate();
- if (!m_xContentArea)
+ if (m_pImpl->IsDisposing())
{
- // tdf#141967 if Activate is called during tear down bail early
+ // tdf#141967/tdf#152495 if Activate is called during tear down bail early
return;
}
//get selection from current view frame