vcl/source/window/mouse.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 8dd46a846fcdfd2b8cb81557b92c74e5e65e8d28 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Jan 29 21:06:35 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu Dec 10 21:01:24 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().) Change-Id: Idd145082b58c10139be53e9b997efedeb0cec364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87709 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> Signed-off-by: Michael Meeks <michael.me...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107578 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 0aea5205fbb5..16993d199987 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -312,7 +312,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 libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits