diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-05-15 13:33:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-05-17 23:11:29 +0200 |
commit | 7952477debb9b7f10ec1e10bd6aac66a2e739b94 (patch) | |
tree | e9920494bc020c85a5b81fb8e97a83012209d4e1 /vcl | |
parent | b3c88dc039d447322b8c8c564ab6e2f0ce9c5b90 (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/+/151857
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
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 1aa22918d520..44b2543deb2f 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 |