vcl/source/window/mouse.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 1663c19834fbff0b9bddfaa7f353c9a1e0589739 Author: Miklos Vajna <[email protected]> AuthorDate: Wed Jan 29 21:06:35 2020 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Dec 14 15:59:26 2020 +0100 vcl: fix UB in vcl::Cursor::ImplDoShow() pWindow->mpWindowImpl can be nullptr here, see online.git's unit-load-torture test: vcl/source/window/cursor.cxx:204:54: runtime error: member access within null pointer of type 'WindowImpl' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcl/source/window/cursor.cxx:204:54 in (And one more similar case in Window::ImplGrabFocus().) (cherry picked from commit f12fc2d07e6f2e9d33ad9350b1f005cbcbe72a18) Conflicts: vcl/source/window/cursor.cxx Change-Id: Idd145082b58c10139be53e9b997efedeb0cec364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107597 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 01adba1a2b80..47116725856f 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -313,7 +313,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) pSVData->mpWinData->mpFocusWin = this; - if ( pOldFocusWindow ) + if ( pOldFocusWindow && pOldFocusWindow->mpWindowImpl ) { // Cursor hidden if ( pOldFocusWindow->mpWindowImpl->mpCursor ) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
