vcl/source/window/dialog.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 3c31a10b8ad12fcfb09c6df930b185ad8a0fae6b
Author: Mike Kaganski <[email protected]>
AuthorDate: Thu Jan 16 13:04:25 2025 +0500
Commit: Miklos Vajna <[email protected]>
CommitDate: Fri Jan 17 09:05:19 2025 +0100
Add an assert to allow debugging not yet async dialogs
Commit f8528cdda9292c7ae6c9d49b80c1a3a3b4a67094 (LOK: don't crash when
trying to show a dialog during file load, 2024-12-26) fixed a crash
when a not async / not properly set up dialog was attempted in Online.
This is reasonable in release builds, but the added assert helps to
find the problem in development (debug) builds.
Change-Id: Ie75574cc7a69de06f6b63925249a5da2e50abb6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180345
Reviewed-by: Miklos Vajna <[email protected]>
Tested-by: Jenkins CollaboraOffice <[email protected]>
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 0a664b96d706..b8d9cc2183df 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -941,6 +941,10 @@ bool Dialog::ImplStartExecute()
// Also pNotifier may be nullptr when a dialog (e.g., "update
// links?") is to be shown when loading a document.
+ // Never crash in release builds (assume "cancel"), but allow
+ // to see the not yet async / not properly set up dialogs in
+ // debug builds.
+ assert(!"A dialog without a notifier: make me async / properly
set up");
return false;
}
}