From dfcd09f7749ec86af2251e777c989e42eca68cf4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 10 Feb 2014 10:42:59 +0000 Subject: coverity#1130193 Dereference after null check Change-Id: I38078c01f8ac37735784508664dfe31aa8f7cf3a --- ucb/source/core/FileAccess.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ucb') diff --git a/ucb/source/core/FileAccess.cxx b/ucb/source/core/FileAccess.cxx index 4394ae148c62..c9a167477d03 100644 --- a/ucb/source/core/FileAccess.cxx +++ b/ucb/source/core/FileAccess.cxx @@ -588,7 +588,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) } catch ( InteractiveIOException const & e ) { - if ( xIH.is() ) + if ( xIH.is() && mpEnvironment ) mpEnvironment->setHandler( xIH ); if ( e.Code == IOErrorCode_NOT_EXISTING ) @@ -611,7 +611,7 @@ Reference< XStream > OFileAccess::openFileReadWrite( const OUString& FileURL ) throw; } - if ( xIH.is() ) + if ( xIH.is() && mpEnvironment ) mpEnvironment->setHandler( xIH ); Reference< XStream > xRet = xSink->getStream(); -- cgit v1.2.3