Kaydet (Commit) dfcd09f7 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1130193 Dereference after null check

Change-Id: I38078c01f8ac37735784508664dfe31aa8f7cf3a
üst 4d6f797e
...@@ -588,7 +588,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) ...@@ -588,7 +588,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL )
} }
catch ( InteractiveIOException const & e ) catch ( InteractiveIOException const & e )
{ {
if ( xIH.is() ) if ( xIH.is() && mpEnvironment )
mpEnvironment->setHandler( xIH ); mpEnvironment->setHandler( xIH );
if ( e.Code == IOErrorCode_NOT_EXISTING ) if ( e.Code == IOErrorCode_NOT_EXISTING )
...@@ -611,7 +611,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) ...@@ -611,7 +611,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL )
throw; throw;
} }
if ( xIH.is() ) if ( xIH.is() && mpEnvironment )
mpEnvironment->setHandler( xIH ); mpEnvironment->setHandler( xIH );
Reference< XStream > xRet = xSink->getStream(); Reference< XStream > xRet = xSink->getStream();
......
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