sc/source/ui/undo/undoblk.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit fa3cfa7ac8b9000aec943e13dc75f8d3828685b4
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Aug 11 11:00:49 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Aug 11 18:11:15 2023 +0200

    cid#1539806 Dereference after null check
    
    Change-Id: I5fe74e633e8374eb38cf39f5989f7d2e696e445e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155581
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 0ef3e22f66b1..d352ba143ba8 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1148,8 +1148,10 @@ void ScUndoPaste::DoChange(bool bUndo)
     pDocShell->PostPaint(aDrawRanges, nPaint, nExtFlags);
 
     pDocShell->PostDataChanged();
-    if (pViewShell)
-        pViewShell->CellContentChanged();
+    if (!pViewShell)
+        return;
+
+    pViewShell->CellContentChanged();
 
     if (bColsAffected || bRowsAffected)
         ScTabViewShell::notifyAllViewsSheetGeomInvalidation(

Reply via email to