[Libreoffice-commits] core.git: vcl/source

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Oct 12 00:27:33 UTC 2017


 vcl/source/control/listctrl.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 38f9bb33dd6ef4870a71440cf6a86caf5576eaef
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Fri Sep 29 10:05:37 2017 +0200

    prevent crash while disposing ListControl when children are disposed
    
    Change-Id: I9e69d0b29ab41428d87bf37edeebe652f7e9c297
    Reviewed-on: https://gerrit.libreoffice.org/43251
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/vcl/source/control/listctrl.cxx b/vcl/source/control/listctrl.cxx
index 66c743fd83a2..1c42b0565fb9 100644
--- a/vcl/source/control/listctrl.cxx
+++ b/vcl/source/control/listctrl.cxx
@@ -45,6 +45,12 @@ void ListControl::dispose()
 
 void ListControl::RecalcAll()
 {
+    // avoid recalculating while we are disposing
+    // children. This just leads to complex invalid memory
+    // access patterns that are not fixable.
+    if (IsDisposed())
+        return;
+
     sal_Int32 nTotalHeight = 0;
     for (const auto& item : maEntries)
     {


More information about the Libreoffice-commits mailing list