sdext/source/presenter/PresenterProtocolHandler.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 807710d6cffe1a2b40a8937c0df43a8ac1034120
Author:     Patrick Luby <[email protected]>
AuthorDate: Fri Apr 21 14:34:39 2023 -0400
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Wed May 3 12:13:14 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 <[email protected]>
    Reviewed-by: Patrick Luby <[email protected]>
    (cherry picked from commit 6f4fb52116c08b0c6247dc4828442f4e3644e9eb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150775
    (cherry picked from commit 14c4b0d11211cc27fb3a0cae246d8e971d6d8f9a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150793
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 98470b6785578b417e9c4d5ea565f412135eeba8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150912
    Reviewed-by: Christian Lohmaier <[email protected]>
    Tested-by: Adolfo Jayme Barrientos <[email protected]>
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/sdext/source/presenter/PresenterProtocolHandler.cxx 
b/sdext/source/presenter/PresenterProtocolHandler.cxx
index 832790737295..efd572ee938b 100644
--- a/sdext/source/presenter/PresenterProtocolHandler.cxx
+++ b/sdext/source/presenter/PresenterProtocolHandler.cxx
@@ -306,7 +306,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));
     }

Reply via email to