sd/source/console/PresenterProtocolHandler.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit b3f3d1447477428669a6d96dc2d6421de61204ba Author: Patrick Luby <patrick.l...@collabora.com> AuthorDate: Sun Apr 16 10:10:35 2023 -0400 Commit: Patrick Luby <plub...@neooffice.org> CommitDate: Fri Apr 21 19:08:10 2023 +0200 tdf#154546 skip dispatch when presenter controller is not set mpPresenterController is sometimes unset and this will cause a crash when pressing the presenter console's Exchange button. Change-Id: Ibfc866d573ce0c535df5c8fdbd6d358353784854 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150456 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Patrick Luby <plub...@neooffice.org> diff --git a/sd/source/console/PresenterProtocolHandler.cxx b/sd/source/console/PresenterProtocolHandler.cxx index 8064f56597c4..ddfb4340c09b 100644 --- a/sd/source/console/PresenterProtocolHandler.cxx +++ b/sd/source/console/PresenterProtocolHandler.cxx @@ -307,7 +307,10 @@ Reference<frame::XDispatch> SAL_CALL PresenterProtocolHandler::queryDispatch ( Reference<frame::XDispatch> xDispatch; - if (rURL.Protocol == "vnd.org.libreoffice.presenterscreen:") + // tdf#154546 skip dispatch when presenter controller is not set + // mpPresenterController is sometimes unset and this will cause a + // crash when pressing the presenter console's Exchange button. + if (rURL.Protocol == "vnd.org.libreoffice.presenterscreen:" && mpPresenterController.is()) { xDispatch.set(Dispatch::Create(rURL.Path, mpPresenterController)); }