sc/source/core/data/drwlayer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit a13d6e441d91a1a071ac57b20df6774cee2de0f6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Apr 1 10:53:25 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Apr 1 13:03:39 2023 +0200 cid#1524623 Dereference after null check Change-Id: I43de41c207d129013fa9c2003cccb12facf3f1da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index a3162055d386..12d0c5153a6f 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1935,7 +1935,7 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const { // Copy style sheet auto pStyleSheet = pOldObject->GetStyleSheet(); - if (pStyleSheet && !bSameDoc) + if (pStyleSheet && !bSameDoc && pClipDoc) pDoc->GetStyleSheetPool()->CopyStyleFrom(pClipDoc->GetStyleSheetPool(), pStyleSheet->GetName(), pStyleSheet->GetFamily(), true);