diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-09-29 10:05:37 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-10-12 02:27:11 +0200 |
commit | 38f9bb33dd6ef4870a71440cf6a86caf5576eaef (patch) | |
tree | a2b0b5e4803904364fece1a8a21524dc9e1ab3c1 /vcl/source | |
parent | 0448c3c9de5a5fe9f6bd7caa9b8502a276744df4 (diff) |
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@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/listctrl.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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) { |