From cdc438e60ffb96ca85e9dd7060ba2b68db3821d4 Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Sun, 8 Mar 2020 21:47:40 -0800 Subject: tdf#131208 Don't try to set cursor focus after style apply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems after a style is applied, the outliner view pointer points to an OutlinerView that has been removed. This results in a crash when trying to access OutlinerView functions to set cursor focus to the document. Avoid this by checking if a style has just been applied. Change-Id: Idda11567506fcc60a830dce70b86e12e2079c7a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90198 Tested-by: Jenkins Reviewed-by: Jim Raykowski (cherry picked from commit b39c08773db9bea776001c6ccf043684c2dfe08d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90267 Reviewed-by: Xisco FaulĂ­ --- sd/source/ui/view/drtxtob1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sd') diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 01b30cbe35ff..dee90a13098c 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -759,7 +759,7 @@ void TextObjectBar::Execute( SfxRequest &rReq ) break; } - if ( pOLV ) + if ( nSlot != SID_STYLE_APPLY && pOLV ) { pOLV->ShowCursor(); pOLV->GetWindow()->GrabFocus(); -- cgit