summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-07-01 16:18:48 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-07-01 16:20:01 +0200
commitb382f5df849b7ceb22aa0fba73287f040478dc13 (patch)
tree87063fc8073952d06d51a574eae749fcd0759441 /sc
parent31050012a4010f44f8cf4698824f6f806ed1f3b2 (diff)
coverity#705845 Dereference before null
Change-Id: I4aecc132ca45abd45183455c87be4c4a3749d983
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewfun2.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 84044529dee2..4bfb03835ebc 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -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);