diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-24 08:43:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-24 10:48:37 +0200 |
commit | 7364a206a67f73513590fbb55e9e1d630c97aab1 (patch) | |
tree | 77d0a5e90dc6acb6550bba2808aaaccbb846a1f1 /sfx2 | |
parent | 6c6b00300c5430466804619394b84beea01b3187 (diff) |
tdf#128077 crash with calc dialogs and multiple windows
regression from
commit bf359d01ac8b1e0292e8a92c38e58c03e6c17d8b
add a Dialog::runAsync for the non-controller case
we end up destroying the dialog controller while the controller is in
it's own method, so keep it alive for the duration.
Change-Id: I0f26b4d40351ad62378f58c560f1a6d69d57a88e
Reviewed-on: https://gerrit.libreoffice.org/81425
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index c1906d547cf0..30f0d0f71ba9 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -183,6 +183,12 @@ bool SfxModelessDialogController::IsClosing() const void SfxModelessDialogController::EndDialog() { + if (m_xImpl->bClosing) + return; + // In the case of async dialogs, the call to SfxDialogController::EndDialog + // may delete this object, so keep myself alive for the duration of this + // stack frame. + auto aHoldSelf = shared_from_this(); m_xImpl->bClosing = true; SfxDialogController::EndDialog(); if (!m_xImpl) |