summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-06-16 12:06:56 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2020-06-23 10:17:38 +0200
commit5aea21c0f92be5ac2fc1bd510723c1de3f01f058 (patch)
tree013804e3f54aa46f10fe45787c2de5733a1f3bc7 /desktop
parent7463f150bf8a31b5febe3f91dc082124d53df504 (diff)
jsdialog: try call welded action even if window doesn't exist
Change-Id: I8ae96d2e61899c89b5ddb8ff362d8a066ded3960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96922 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.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2d043e276a7c..771bc2e72b02 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3580,12 +3580,7 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
if (!pWindow && nWindowId >= 1000000000 /* why unsigned? */)
pWindow = getSidebarWindow();
- if (!pWindow)
- {
- SetLastExceptionMsg("Document doesn't support dialog rendering, or window not found.");
- return;
- }
- else if (aMap.find("id") != aMap.end())
+ if (aMap.find("id") != aMap.end())
{
static const OUString sClickAction("CLICK");
static const OUString sSelectAction("SELECT");
@@ -3700,6 +3695,12 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
}
}
+ if (!pWindow)
+ {
+ SetLastExceptionMsg("Document doesn't support dialog rendering, or window not found.");
+ return;
+ }
+
if (!bIsWeldedDialog || bContinueWithLOKWindow)
{
WindowUIObject aUIObject(pWindow);