sw/source/core/crsr/pam.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 4c8517e7d89f7b87eeb36b2758a01d9dac515d5a Author: Xisco Fauli <[email protected]> AuthorDate: Thu Dec 22 12:47:56 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Thu Dec 22 15:48:24 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 <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 9295b09a7480..d162bfb9516b 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -918,7 +918,7 @@ bool SwPaM::HasReadonlySel(bool bFormView, bool const isReplace) 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.
