summaryrefslogtreecommitdiff
path: root/desktop/source/lib
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-10-17 18:41:10 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2019-10-18 08:39:21 +0200
commitdfabe21ac98d22150b23fbb973ef3d77ea839061 (patch)
treecc9d061426a5527017c7efb70e061ca8a1b23445 /desktop/source/lib
parent5e69646bfde3bc277d32ace25a4729aecf498fe8 (diff)
jsdialogs: avoid exception crashing app on events
Change-Id: I83ddb44f54061d9f585eef3864415a472151976a Reviewed-on: https://gerrit.libreoffice.org/80989 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'desktop/source/lib')
-rw-r--r--desktop/source/lib/init.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d2e9cfb7161e..ee0161d4eaf8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3297,10 +3297,13 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
else
{
OUString sAction("CLICK");
- WindowUIObject aUIObject(pWindow);
- std::unique_ptr<UIObject> pUIWindow(aUIObject.get_child(sId));
- if (pUIWindow)
- pUIWindow->execute(sAction, StringMap());
+ try
+ {
+ WindowUIObject aUIObject(pWindow);
+ std::unique_ptr<UIObject> pUIWindow(aUIObject.get_child(sId));
+ if (pUIWindow)
+ pUIWindow->execute(sAction, StringMap());
+ } catch(...) {}
// force resend
pWindow->Resize();