summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/remotecontrol/Communicator.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx
index e5459fb39166..63ace55201f3 100644
--- a/sd/source/ui/remotecontrol/Communicator.cxx
+++ b/sd/source/ui/remotecontrol/Communicator.cxx
@@ -53,11 +53,15 @@ void Communicator::execute()
Receiver aReceiver( pTransmitter );
try {
uno::Reference< frame::XDesktop2 > xFramesSupplier = frame::Desktop::create( ::comphelper::getProcessComponentContext() );
- uno::Reference< frame::XFrame > xFrame ( xFramesSupplier->getActiveFrame(), uno::UNO_QUERY_THROW );
- uno::Reference<presentation::XPresentationSupplier> xPS ( xFrame->getController()->getModel(), uno::UNO_QUERY_THROW);
- uno::Reference<presentation::XPresentation2> xPresentation(
- xPS->getPresentation(), uno::UNO_QUERY_THROW);
- if ( xPresentation->isRunning() )
+ uno::Reference< frame::XFrame > xFrame ( xFramesSupplier->getActiveFrame(), uno::UNO_QUERY );
+
+ uno::Reference<presentation::XPresentationSupplier> xPS;
+ if( xFrame.is() )
+ xPS = uno::Reference<presentation::XPresentationSupplier>( xFrame->getController()->getModel(), uno::UNO_QUERY );
+ uno::Reference<presentation::XPresentation2> xPresentation;
+ if( xPS.is() )
+ xPresentation = uno::Reference<presentation::XPresentation2>( xPS->getPresentation(), uno::UNO_QUERY );
+ if ( xPresentation.is() && xPresentation->isRunning() )
{
presentationStarted( xPresentation->getController() );
}