diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-03 11:32:21 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-30 15:03:06 +0100 |
commit | 966dcbab42bf3c6cf21e4b28903fe5ba65437514 (patch) | |
tree | a44080e468a3f29a9b6bf2c8c104724e4c7edeb0 /vcl | |
parent | bc3ec10d244efa512da2e9c82d8b0ebbf4b972c1 (diff) |
jsdialog: prevent from crash
Change-Id: If17738b7f58037929e29def75736434c33649b42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106567
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/jsdialog/executor.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 53fded14e1c1..27d61d65209a 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -47,7 +47,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat if (sAction == "selected") { int separatorPos = rData["data"].indexOf(';'); - if (separatorPos) + if (separatorPos > 0) { OUString entryPos = rData["data"].copy(0, separatorPos); OString posString = OUStringToOString(entryPos, RTL_TEXTENCODING_ASCII_US); |