summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-10-31 21:38:44 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-10-31 21:40:59 +0100
commit88f91adf266f19659014df22e09ce6c6761fb6f1 (patch)
treed6082d5b2036011ebf226849263f408afb115ce5
parent0ca429a00b6fca4eed328d106e95b447dd813e58 (diff)
update first ScMarkData before setting cursor (fdo#42432)
our ScMarkData instance might be used to set the cursor which will result in a crash if the selected sheet has been deleted already
-rw-r--r--sc/source/ui/view/tabview3.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index de2d683d4ad0..fdb0b923bfd9 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1511,7 +1511,6 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
// Fenster findet (wird aus SetCursor gerufen)
UpdateShow();
aViewData.ResetOldCursor();
- SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), true );
SfxBindings& rBindings = aViewData.GetBindings();
ScMarkData& rMark = aViewData.GetMarkData();
@@ -1548,6 +1547,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
rBindings.Invalidate( FID_TAB_DESELECTALL );
}
+ SetCursor( aViewData.GetCurX(), aViewData.GetCurY(), true );
bool bUnoRefDialog = pScMod->IsRefDialogOpen() && pScMod->GetCurRefDlgId() == WID_SIMPLE_REF;
// recalc zoom-dependent values (before TabChanged, before UpdateEditViewPos)