sc/source/ui/app/inputhdl.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 3b31561c3993aba9a49223ede7f1d72482f7b853 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Jan 11 08:46:07 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Thu Jan 11 13:23:31 2024 +0100 cid#1583748 Dereference after null check Change-Id: I147e0454e215b3a26e97c0a6d727db25fd2549a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161918 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index f6dc87260605..de41ddcc8d4d 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3862,8 +3862,10 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false ScModule* pScMod = SC_MOD(); const ScInputOptions& rOpt = pScMod->GetInputOptions(); - if ( (rOpt.GetMoveKeepEdit() && !comphelper::LibreOfficeKit::isActive()) - || (pActiveViewSh->GetMoveKeepEdit() && comphelper::LibreOfficeKit::isActive()) ) + const bool bKit = comphelper::LibreOfficeKit::isActive(); + + if ( (rOpt.GetMoveKeepEdit() && !bKit) + || (pActiveViewSh && pActiveViewSh->GetMoveKeepEdit() && bKit) ) pScMod->SetInputMode( SC_INPUT_TABLE ); bUsed = true;