diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-05-15 13:33:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-05-16 08:48:24 +0200 |
commit | 0acf7ff1cf7a7b34f9e731e6152b6cefaa8826a1 (patch) | |
tree | 849c80ee742a09223f94506a1122cfe48d7d7544 /vcl | |
parent | 7b0259573fb3c16e43fb47cf5f2548c81f162383 (diff) |
vcl: fix crash in Window::GetOutDev()
Crashreport signature:
program/libmergedlo.so
rtl::Reference<vcl::WindowOutputDevice>::get() const
include/rtl/ref.hxx:208
program/libmergedlo.so
vcl::Window::GetOutDev()
vcl/source/window/window.cxx:574
program/libswlo.so
SwViewShell::ImplEndAction(bool)
sw/source/core/view/viewsh.cxx:294
program/libswlo.so
SwViewShell::EndAction(bool)
sw/inc/viewsh.hxx:611
i.e. GetOutDev() is called on a disposed vcl::Window.
Change-Id: I5b17225fced85c6804fc93fd12021c92966d3aa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151763
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/window.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 4ce13d590fe2..965f8772c293 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -571,7 +571,7 @@ Window::~Window() ::OutputDevice* Window::GetOutDev() { - return mpWindowImpl->mxOutDev.get(); + return mpWindowImpl ? mpWindowImpl->mxOutDev.get() : nullptr; } Color WindowOutputDevice::GetBackgroundColor() const |