diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-03-10 16:24:16 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-06-22 09:41:13 +0200 |
commit | 70479e1f4cb3c120f46239a648e65f035af2922d (patch) | |
tree | 946c7db18d67e3db46fd73ddcf0e462ec52241e8 /desktop | |
parent | aabcf90da9a90240bddc140485f210dcab66724c (diff) |
jsdialog: avoid crash in watermark dialog
Change-Id: Iea4a0e6ce005d6a86f9a228026471dd4b4c7b2da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94340
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96830
Tested-by: Jenkins
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a9202a0c90b5..0918b86982d6 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3610,12 +3610,14 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin static const OUString sDownAction("DOWN"); static const OUString sValue("VALUE"); + bool bIsWeldedDialog = false; + try { OString sControlId = OUStringToOString(aMap["id"], RTL_TEXTENCODING_ASCII_US); weld::Widget* pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, sControlId); - bool bIsWeldedDialog = pWidget != nullptr; + bIsWeldedDialog = pWidget != nullptr; bool bContinueWithLOKWindow = false; if (bIsWeldedDialog) @@ -3718,7 +3720,8 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin } catch(...) {} // force resend - pWindow->Resize(); + if (!bIsWeldedDialog) + pWindow->Resize(); } } |