From 7ff207662b459d0673f3b369c29c9b47da64589b Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 10 Mar 2020 16:24:16 +0100 Subject: jsdialog: avoid crash in watermark dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iea4a0e6ce005d6a86f9a228026471dd4b4c7b2da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94340 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- desktop/source/lib/init.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2734dd52c035..9f56344b640f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3571,12 +3571,14 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin const OUString sDownAction("DOWN"); 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) @@ -3679,7 +3681,8 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin } catch(...) {} // force resend - pWindow->Resize(); + if (!bIsWeldedDialog) + pWindow->Resize(); } } -- cgit