sw/source/core/crsr/pam.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 7e989325f4f95f46110fc826d146f1e5dd544701 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Dec 22 12:47:56 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Dec 22 19:23:07 2022 +0000 sw: check for nullptr GetEditShell() in sw/source/core/doc/doccorr.cxx might return nullptr Introduced in 7cb6be3e866bad39a37844802d49b1f5c7031910 "tdf#151190 sw content controls: make them read-write in protected sections" See https://crashreport.libreoffice.org/stats/crash_details/5d1da2eb-b0e9-4974-b726-c7837c47cc63 Change-Id: Ia133c5d7a680c3bdfabe1c43c538cb5f54e7df73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144756 Tested-by: Jenkins Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 4c8517e7d89f7b87eeb36b2758a01d9dac515d5a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144725 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 88cb29a51ac3556301d02921c573b57d6218bc04) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144726 diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 6dc26d2ac074..0a2b1f087844 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -762,7 +762,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const // Allow editing when the cursor/selection is fully inside of a legacy form field. bRet = !( pA != nullptr && !bAtStartA && !bAtStartB && pA == pB ); - if (bRet && rDoc.GetEditShell()->CursorInsideContentControl()) + if (bRet && rDoc.GetEditShell() && rDoc.GetEditShell()->CursorInsideContentControl()) { // Also allow editing inside content controls in general, similar to form fields. // Specific types will be disabled below.