sd/source/ui/view/Outliner.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit e16226d7e81b7ab608463ec681c7bd7703b41bc2 Author: Mohit Marathe <[email protected]> AuthorDate: Mon Feb 2 20:13:44 2026 +0530 Commit: Mohit Marathe <[email protected]> CommitDate: Thu Feb 5 13:46:02 2026 +0100 sd: svx: fix crash when searching text while text edit is active in other view by skipping search in shape which is being edited. The crash was caused because SdOutliner was deleted after SdrTextObj::BegTextEdit returned false when called from SdrObjEditView::SdrBeginTextEdit Backtrace of crash: 0 SdOutliner::Implementation::GetOutlinerView (this=0x0) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/view/Outliner.cxx:91 1 0x0000741cff1e4988 in SdOutliner::getOutlinerView (this=0x60b85732b8c0) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/view/Outliner.cxx:245 2 0x0000741cff1ed11f in SdOutliner::PrepareSearchAndReplace (this=0x60b85732b8c0) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/view/Outliner.cxx:1592 3 0x0000741cff1e7550 in SdOutliner::ProvideNextTextObject (this=0x60b85732b8c0) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/view/Outliner.cxx:1377 4 0x0000741cff1e9bf0 in SdOutliner::SearchAndReplaceOnce (this=0x60b85732b8c0, pSelections=0x0) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/view/Outliner.cxx:940 5 0x0000741cff1e8348 in SdOutliner::StartSearchAndReplace (this=0x60b85732b8c0, pSearchItem=0x60b8557e8980) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/view/Outliner.cxx:519 6 0x0000741cfeeaaff1 in sd::FuSearch::SearchAndReplace (this=0x60b8573288a0, pSearchItem=0x60b8557e8980) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/func/fusearch.cxx:143 7 0x0000741cfed9b3d0 in sd::DrawDocShell::Execute (this=0x60b855995e30, rReq=...) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/docshell/docshel3.cxx:224 8 0x0000741cff2db6f3 in sd::DrawViewShell::Execute (this=0x60b846a3de70, rReq=...) at /home/mohitm/work/libreoffice/co-25.04/sd/source/ui/view/drviews7.cxx:1973 Signed-off-by: Mohit Marathe <[email protected]> Change-Id: I47a16a3e3695a4e1d9e307c1207de570ee0ecd1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198196 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 6f37edc79e70..ae1570718631 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1221,7 +1221,7 @@ namespace bool lclIsValidTextObject(const sd::outliner::IteratorPosition& rPosition) { auto* pObject = DynCastSdrTextObj( rPosition.mxObject.get().get() ); - return (pObject != nullptr) && pObject->HasText() && ! pObject->IsEmptyPresObj(); + return (pObject != nullptr) && pObject->HasText() && ! pObject->IsEmptyPresObj() && !pObject->IsInEditMode(); } bool isValidVectorGraphicObject(const sd::outliner::IteratorPosition& rPosition)
