summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-03-10 16:24:16 +0100
committerSzymon Kłos <eszkadev@gmail.com>2020-05-19 11:09:16 +0200
commit7ff207662b459d0673f3b369c29c9b47da64589b (patch)
tree59f81e51629bc43cc87ee705efdcaccc5813c95c /desktop
parentf8f55d5e55f9ee0dd6e0bef085a9e2fa07803a3a (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>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx7
1 files changed, 5 insertions, 2 deletions
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();
}
}