vcl/jsdialog/jsdialogbuilder.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 021d72708fd460d78831333939804a8345b8f9ae Author: Dennis Francis <[email protected]> AuthorDate: Tue Feb 24 18:32:09 2026 +0530 Commit: Miklos Vajna <[email protected]> CommitDate: Wed Feb 25 09:38:41 2026 +0100 lok:followup: warn if existing notifier is not same Signed-off-by: Dennis Francis <[email protected]> Change-Id: I9d5df7443e518078c95bb9d85dd82ec530fd17ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200200 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 9bab565cf03f..425e9e68c5c8 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -933,8 +933,14 @@ JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMe eButtonType); // SetLOKNotifier() asserts that xMessageDialog has no LOKNotifier already. - if (pNotifier && !xMessageDialog->GetLOKNotifier()) - xMessageDialog->SetLOKNotifier(pNotifier); + auto* pExistingNotifier = xMessageDialog->GetLOKNotifier(); + if (pNotifier) + { + if (!pExistingNotifier) + xMessageDialog->SetLOKNotifier(pNotifier); + else if (pExistingNotifier != pNotifier) + SAL_WARN("vcl", "A different notifier already exists for the MessageDialog"); + } pNotifier = xMessageDialog->GetLOKNotifier(); if (pNotifier)
