vcl/source/window/window.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 33258dfc3b97fd357273c52d9c7c9854362e25b6
Author:     Miklos Vajna <>
AuthorDate: Mon Aug 12 17:57:25 2019 +0200
Commit:     Xisco Faulí <>
CommitDate: Wed Aug 14 12:07:44 2019 +0200

    tdf#126808 vcl: fix crash due to leaking the frame's buffer vdev
    This vdev is used to do vcl-level double-buffering, which is off by
    default, but e.g. listboxes/comboboxes use it to avoid flicker with
    Windows GDI.
    The root cause was introduced in commit
    ea5e83abcfa1406c401b8a1ec91efda65373b74b (tdf#92982 vcl: stop
    creating/disposing the paint buffer in PaintHelper, 2015-07-30), which
    removed the explicit mpBuffer.disposeAndClear() in the PaintHelper dtor,
    but forgot to explicitly dispose it elsewhere.
    This is now a much more visible problem since commit
    d4714b0fdb81e6e561ae526cc517ecc9a40a603e (tdf#101978 vcl
    combobox/listbox floating window: avoid flicker, 2019-06-17) as the
    infrastructure is used for all list/comboboxes.
    Fix the problem by explicitly disposing the vdev before deleting the
    frame data, so the underlying GDI resource is released, even if we have
    a reference cycle.
    Change-Id: Ia217bbd78780a214308e497044e73e378ee8ecd6
    Reviewed-by: Miklos Vajna <>
    Tested-by: Jenkins
    (cherry picked from commit e71093c0bc52426647a9d3a41ac0643bbc6cb0c6)
    Reviewed-by: Xisco Faulí <>

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 9b7a1580bbcf..ee003311e084 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -554,6 +554,7 @@ void Window::dispose()
         assert (mpWindowImpl->mpFrameData->mnFocusId == nullptr);
         assert (mpWindowImpl->mpFrameData->mnMouseMoveId == nullptr);
+        mpWindowImpl->mpFrameData->mpBuffer.disposeAndClear();
         delete mpWindowImpl->mpFrameData;
         mpWindowImpl->mpFrameData = nullptr;
Libreoffice-commits mailing list

Reply via email to