summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-20 11:27:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-27 12:50:25 +0200
commit39f42fbd3f91afad60dad2937d2dfed79b956485 (patch)
tree56855b5b4daa6324527142404c17b2cf6b438ed8 /include
parent892329fc88116cbe70f0d92f8d307775840595b4 (diff)
tdf#132940 Crash in mergedlo!vcl::Region::operator=
We had a SdrPageWindow accessing a SdPaintWindow that had already been freed. Turns that SdrPageWindow can be "patched" more than once given enough stuff going on in writer, so make the call sites restore the previous state as the stack unwinds. Change-Id: Ia1ef5c9b2f818b7873e8e739c9cdf257554e403a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 445cf499666f21c2d480ce1df9ce6004b9450b64) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101450
Diffstat (limited to 'include')
-rw-r--r--include/svx/sdrpagewindow.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/svx/sdrpagewindow.hxx b/include/svx/sdrpagewindow.hxx
index 80417a6729a0..f5cb98c297da 100644
--- a/include/svx/sdrpagewindow.hxx
+++ b/include/svx/sdrpagewindow.hxx
@@ -68,8 +68,8 @@ public:
rtl::Reference< sdr::overlay::OverlayManager > const & GetOverlayManager() const;
// #i72752# allow patcing SdrPaintWindow from SdrPageView::DrawLayer if needed
- void patchPaintWindow(SdrPaintWindow& rPaintWindow);
- void unpatchPaintWindow();
+ [[nodiscard]] SdrPaintWindow* patchPaintWindow(SdrPaintWindow& rPaintWindow);
+ void unpatchPaintWindow(SdrPaintWindow* pPreviousPaintWindow);
// the repaint method. For migration from pPaintProc, use one more parameter
void PrePaint();