summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorPatrick Luby <patrick.luby@collabora.com>2023-04-21 14:34:39 -0400
committerAndras Timar <andras.timar@collabora.com>2023-05-13 20:05:23 +0200
commita722ca0facbb0d4d96fa878764f4f1c1e4f4958a (patch)
tree05e7da692cdba4dec1bd031a1db791061bb3438e /sdext
parent8a5ca039b87c9002ad883a0d8070ebbcdbfb635d (diff)
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.grandin@collabora.co.uk> Reviewed-by: Patrick Luby <plubius@neooffice.org> (cherry picked from commit 6f4fb52116c08b0c6247dc4828442f4e3644e9eb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150775
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterProtocolHandler.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx b/sdext/source/presenter/PresenterProtocolHandler.cxx
index a32a73b6180e..96c538876de6 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/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));
}