summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-08 12:40:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-08 14:25:04 +0000
commitc50b79fbc23c06b55c51861aac8f9a2fd60c0500 (patch)
tree0a578ddedc95f0d3f32eb8824fce9bfd4ded7f79 /sc
parent1bc8bc96c15be640e247c10f6beb719c98fcc206 (diff)
coverity#1130369 Dereference after null check
Change-Id: Id931c038f3715ea69a798de4b14b46dfa9d2afda
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/impex.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 46215811392d..deb599d352b2 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -241,7 +241,7 @@ void ScImportExport::EndPaste(bool bAutoRowHeight)
bool bHeight = bAutoRowHeight && pDocSh && pDocSh->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row(), aRange.aStart.Tab() );
- if( pUndoDoc && pDoc->IsUndoEnabled() )
+ if( pUndoDoc && pDoc->IsUndoEnabled() && pDocSh )
{
ScDocument* pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndo( pDoc, aRange.aStart.Tab(), aRange.aEnd.Tab() );