sw/source/uibase/uno/loktxdoc.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit b1d6fa1c5c7dbfe1b14e1662dd1d0f6a190fb8e1 Author: Mike Kaganski <[email protected]> AuthorDate: Thu Nov 27 14:42:11 2025 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Nov 27 17:10:04 2025 +0100 enable-msvc-analyze: C6011: Dereferencing NULL pointer C:\lo Dereferencing NULL pointer 'pView'. .: Lines: 1140, 1141, 1146, 1147 Change-Id: I1202de25d3d260a7daf9111c4e1b6fd68fc5611f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194704 Reviewed-by: Mike Kaganski <[email protected]> Code-Style: Christian Lohmaier <[email protected]> Tested-by: Jenkins Code-Style: Mike Kaganski <[email protected]> diff --git a/sw/source/uibase/uno/loktxdoc.cxx b/sw/source/uibase/uno/loktxdoc.cxx index f6fe6222f0d1..16da26b71946 100644 --- a/sw/source/uibase/uno/loktxdoc.cxx +++ b/sw/source/uibase/uno/loktxdoc.cxx @@ -1144,6 +1144,10 @@ int SwXTextDocument::getEditMode() } SfxViewShell* pView = pViewShell->GetSfxViewShell(); + if (!pView) + { + return 0; + } return pView->getEditMode(); }
