Kaydet (Commit) 5f91bce0 authored tarafından Michael Meeks's avatar Michael Meeks

sdremote - don't crash if we connect during load, before things are setup.

Change-Id: I1837ea58b9c8f74aca9afb78bafbab61af189842
üst cb33ae88
......@@ -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() );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment