diff options
-rw-r--r-- | toolkit/source/helper/unowrapper.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 5d5ce94a9b8f..79d2ee1e2eed 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -240,6 +240,12 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow ) css::uno::Reference< css::lang::XComponent > xComp = pClient->GetComponentInterface( false ); xComp->dispose(); } + else + { + // We need it to dispose the child windows properly (even without window peer), + // otherwise the vcl::Window will be leaked. + pClient.disposeAndClear(); + } pChild = pNextChild; } |