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

New commits:
commit 38f9bb33dd6ef4870a71440cf6a86caf5576eaef
Author: Markus Mohrhard <markus.mohrh...@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.mohrh...@googlemail.com>
    Tested-by: Markus Mohrhard <markus.mohrh...@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)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to