desktop/source/lib/init.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 68fd6a383777027d18f701fa9666ad706a100f26
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Mar 19 14:15:33 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Mar 20 09:47:39 2025 +0100

    jsdialogs: check for empty id
    
    Signed-off-by: Szymon Kłos <szymon.k...@collabora.com>
    Change-Id: Ie8d51bec10cb1a18704af8bc5d265db999558dd1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183129
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3520bba53a97..d7647439ea72 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5052,8 +5052,12 @@ static void lcl_sendDialogEvent(unsigned long long int 
nWindowId, const char* pA
 
     const StringMap aMap(jsdialog::jsonToStringMap(pArguments));
 
-    if (aMap.find(u"id"_ustr) == aMap.end())
+    if (aMap.find(u"id"_ustr) == aMap.end() || aMap.at(u"id"_ustr).isEmpty())
+    {
+        SAL_WARN("lok", "sendDialogEvent: no widget id set");
+        assert(false);
         return;
+    }
 
     const sal_uInt64 nCurrentShellId = 
reinterpret_cast<sal_uInt64>(SfxViewShell::Current());
 

Reply via email to