editeng/source/editeng/impedit.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 751104215e6c4b42b68dd255e48d771e319555b4
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Aug 14 14:04:38 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Aug 15 08:09:14 2023 +0200

    fix crash in LOK
    
    ImpEditView::lokSelectionCallback(std::optional<tools::PolyPolygon>
    const&, bool, bool)
      editeng/source/editeng/impedit.cxx:446
    ImpEditView::DrawSelectionXOR(EditSelection, vcl::Region*,
    OutputDevice*)
      editeng/source/editeng/impedit.cxx:642
    ImpEditEngine::Paint(ImpEditView*, tools::Rectangle const&,
    OutputDevice*)
      editeng/source/editeng/impedit3.cxx:4164
    ScGridWindow::DrawContent(OutputDevice&, ScTableInfo const&,
    ScOutputData&, bool)
      sc/source/ui/view/gridwin4.cxx:1226 (discriminator 1)
    ScGridWindow::PaintTile(VirtualDevice&, int, int, int, int, long, long,
    short, int)
      sc/source/ui/view/gridwin4.cxx:1700
    ScModelObj::paintTile(VirtualDevice&, int, int, int, int, long, long)
    
    Change-Id: Ib142e6bd52bf0271d8e0e97af7701454144ead9d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155607
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 2ccb892ab690..f69b0d1cad82 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -350,7 +350,7 @@ void ImpEditView::lokSelectionCallback(const 
std::optional<tools::PolyPolygon> &
         aItems.emplace_back("endHandleVisible", 
OString::boolean(bEndHandleVisible));
         pNotifier->notifyWindow(pParent->GetLOKWindowId(), "text_selection", 
aItems);
     }
-    else
+    else if (mpViewShell)
     {
         pOutWin->GetOutDev()->Push(vcl::PushFlags::MAPMODE);
         if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip)

Reply via email to