coverity#735801 Dereference after null check

Change-Id: I4a403098388bdb7f4f09242fcd71a50d38fc630e
This commit is contained in:
Caolán McNamara
2014-02-24 09:27:44 +00:00
parent 13afdc0b14
commit 21cea08139

View File

@@ -2992,8 +2992,8 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc )
} }
else else
{ {
if ( ( rRef.aStart.Tab() != aCursorPos.Tab() || if ( rRef.aStart.Tab() != aCursorPos.Tab() ||
rRef.aStart.Tab() != rRef.aEnd.Tab() ) && pDoc ) rRef.aStart.Tab() != rRef.aEnd.Tab() )
aRefStr = rRef.Format(SCA_VALID|SCA_TAB_3D, pDoc, aAddrDetails); aRefStr = rRef.Format(SCA_VALID|SCA_TAB_3D, pDoc, aAddrDetails);
else else
aRefStr = rRef.Format(SCA_VALID, pDoc, aAddrDetails); aRefStr = rRef.Format(SCA_VALID, pDoc, aAddrDetails);