[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sd/source svx/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 5 08:58:43 UTC 2021


 sd/source/ui/unoidl/unomodel.cxx    |    3 ++-
 svx/source/svdraw/sdrpagewindow.cxx |    3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit b9d995a658abd45b769467212583d8281d920505
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Oct 4 12:25:56 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 5 10:58:08 2021 +0200

    lok: fix crash on chart doubleclick in patchPaintWindow
    
    backtrace:
    SdrPageWindow::patchPaintWindow(SdrPaintWindow&) (this=0x0, rPaintWindow=...) at svx/source/svdraw/sdrpagewindow.cxx:168
    SdXImpressDocument::paintTile(VirtualDevice&, int, int, int, int, long, long) (this=0x64589d0, rDevice=..., nOutputWidth=180, nOutputHeight=135, nTilePosX=0, nTilePosY=0, nTileWidth=15875, nTileHeight=11906)
        at sd/source/ui/unoidl/unomodel.cxx:2240
    
    Change-Id: Ie5270c3cc4a40121485d5da756a498ec4fd8bf80
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123044
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index f5d3b51c72d4..87a71531d62c 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2237,7 +2237,8 @@ void SdXImpressDocument::paintTile( VirtualDevice& rDevice,
         {
             patchedPageWindow = pSdrPageView->FindPageWindow(*getDocWindow());
             temporaryPaintWindow.reset(new SdrPaintWindow(*pDrawView, rDevice));
-            previousPaintWindow = patchedPageWindow->patchPaintWindow(*temporaryPaintWindow);
+            if (patchedPageWindow)
+                previousPaintWindow = patchedPageWindow->patchPaintWindow(*temporaryPaintWindow);
         }
     }
 
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index ccb133d10af9..8fd16e1eb02c 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -165,6 +165,9 @@ rtl::Reference< sdr::overlay::OverlayManager > const & SdrPageWindow::GetOverlay
 
 SdrPaintWindow* SdrPageWindow::patchPaintWindow(SdrPaintWindow& rPaintWindow)
 {
+    if (!mpImpl)
+        return nullptr;
+
     if (!mpImpl->mpOriginalPaintWindow)
     {
         // first patch


More information about the Libreoffice-commits mailing list