diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-02-04 21:09:50 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-02-05 09:04:57 +0100 |
commit | cee1568e8915e479732687a7aa3faa639955596d (patch) | |
tree | 11d7483b4bbff8c9fa634b0a3d03758199a0b5da /vcl/source | |
parent | bc887dffd7fd561160b0963cffd8807e3ad2331e (diff) |
vcl: fix UB in Window::ImplNewInputContext()
pFocusWin->mpWindowImpl can be nullptr here, see online.git's
unit-load-torture test:
vcl/source/window/window2.cxx:1059:26: runtime error: member access within null pointer of type 'WindowImpl'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcl/source/window/window2.cxx:1059:26 in
Change-Id: Iebeff5a50d426ffb02c6b15e86631ea110ce81bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87990
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source')
-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 ac4f90123da4..1b888b559a10 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1750,7 +1750,7 @@ void Window::ImplNewInputContext() { ImplSVData* pSVData = ImplGetSVData(); vcl::Window* pFocusWin = pSVData->mpWinData->mpFocusWin; - if ( !pFocusWin ) + if ( !pFocusWin || pFocusWin->IsDisposed() ) return; // Is InputContext changed? |