coverity#983375 Dereference before null check

Change-Id: Ib00b65a5c532c2968785c8783d43d1728b1dfb29
This commit is contained in:
Caolán McNamara
2014-03-22 17:50:27 +00:00
parent efc13bf492
commit 5f01a51762

View File

@@ -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;