coverity#705845 Dereference before null

Change-Id: I4aecc132ca45abd45183455c87be4c4a3749d983
This commit is contained in:
Norbert Thiebaud
2014-07-01 16:18:48 +02:00
parent 31050012a4
commit b382f5df84

View File

@@ -1707,19 +1707,19 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
{
ScDocument* pDoc = GetViewData().GetDocument();
SCCOL nDestCol = rParam.aRefVariableCell.Col();
SCROW nDestRow = rParam.aRefVariableCell.Row();
SCTAB nDestTab = rParam.aRefVariableCell.Tab();
ScEditableTester aTester( pDoc, nDestTab, nDestCol,nDestRow, nDestCol,nDestRow );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
return;
}
if ( pDoc )
{
SCCOL nDestCol = rParam.aRefVariableCell.Col();
SCROW nDestRow = rParam.aRefVariableCell.Row();
SCTAB nDestTab = rParam.aRefVariableCell.Tab();
ScEditableTester aTester( pDoc, nDestTab, nDestCol,nDestRow, nDestCol,nDestRow );
if (!aTester.IsEditable())
{
ErrorMessage(aTester.GetMessageId());
return;
}
OUString aTargetValStr;
if ( rParam.pStrTargetVal != NULL )
aTargetValStr = *(rParam.pStrTargetVal);