diff options
author | Henry Castro <hcastro@collabora.com> | 2019-12-09 18:49:37 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-12-10 13:12:41 +0100 |
commit | 4a437520d6295327d42a586e908c4c6e7b24561e (patch) | |
tree | d26005c86fe58822dad92fa14a781744444185d4 /include/vcl | |
parent | 5ddad0c80efa15500e3259839e2eebcba2e8e241 (diff) |
lok: evaluate assertion if LOK Windows container is empty
It has defined a map container for every LOK windows assigned
a notifier to the client side. However the map container has elements
with VclPtr (reference counter) and it is a global data, so when global
data are disposing, the VclPtr will destroy the Window when the VCL
framework was destroyed that will lead to undefined behavior.
So this commit adds an assert inside DeInitVCL to ensure, if
someone forgot to Release the LOK Notifier.
Change-Id: Ib7f20751af2931f7b0ba3e3d526e734ffc33f171
Reviewed-on: https://gerrit.libreoffice.org/84792
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/window.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 9f97f915b11c..39e64ed22aae 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1240,6 +1240,9 @@ public: /// Find an existing Window based on the LOKWindowId. static VclPtr<vcl::Window> FindLOKWindow(vcl::LOKWindowId nWindowId); + /// check if LOK Window container is empty + static bool IsLOKWindowsEmpty(); + /// Dumps itself and potentially its children to a property tree, to be written easily to JSON. virtual boost::property_tree::ptree DumpAsPropertyTree(); |