diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 17:50:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-22 17:50:27 +0000 |
commit | 5f01a51762d1eba9a5c2ea3f04bc87590faa33a3 (patch) | |
tree | 2697e5df48e325c009f8f4254f6c0493907037f8 /sc/source | |
parent | efc13bf4928abc56722e1e7762441091f8f390b8 (diff) |
coverity#983375 Dereference before null check
Change-Id: Ib00b65a5c532c2968785c8783d43d1728b1dfb29
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/document.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 6ff1f7a19cca..e9417bf6df98 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2166,6 +2166,12 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1, { if (!bIsClip) { + if (!pClipDoc) + { + OSL_TRACE("CopyTabToClip: no ClipDoc"); + pClipDoc = SC_MOD()->GetClipDoc(); + } + if (pShell->GetMedium()) { pClipDoc->maFileURL = pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DECODE_TO_IURI); @@ -2193,11 +2199,6 @@ void ScDocument::CopyTabToClip(SCCOL nCol1, SCROW nRow1, PutInOrder( nCol1, nCol2 ); PutInOrder( nRow1, nRow2 ); - if (!pClipDoc) - { - OSL_TRACE("CopyTabToClip: no ClipDoc"); - pClipDoc = SC_MOD()->GetClipDoc(); - } ScClipParam& rClipParam = pClipDoc->GetClipParam(); pClipDoc->aDocName = aDocName; |