sc/source/ui/view/prevwsh.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 95357b76001a74a23bdc0b68d2e5749124084bce
Author: Mike Kaganski <mike.kagan...@collabora.com>
Date:   Mon Mar 12 10:07:06 2018 +0300

    tdf#103175: Initialize DrawLayer if required
    
    Change-Id: Ia99dd1e349e807d339dce0ead518a72a31e0fc02
    Reviewed-on: https://gerrit.libreoffice.org/51096
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit de53d4690d25b9f1bbc0def6c66ce5b45b2fdc96)
    Reviewed-on: https://gerrit.libreoffice.org/51112
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
    Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 37097ed5474e..86c1e53ff9d0 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -940,7 +940,8 @@ void ScPreviewShell::WriteUserDataSequence(uno::Sequence < 
beans::PropertyValue
     }
 
     // Common SdrModel processing
-    GetDocument().GetDrawLayer()->WriteUserDataSequence(rSeq);
+    if (ScDrawLayer* pDrawLayer = GetDocument().GetDrawLayer())
+        pDrawLayer->WriteUserDataSequence(rSeq);
 }
 
 void ScPreviewShell::ReadUserDataSequence(const uno::Sequence < 
beans::PropertyValue >& rSeq)
@@ -967,7 +968,7 @@ void ScPreviewShell::ReadUserDataSequence(const 
uno::Sequence < beans::PropertyV
                         pPreview->SetPageNo(nTemp);
                 }
                 // Fallback to common SdrModel processing
-                else 
GetDocument().GetDrawLayer()->ReadUserDataSequenceValue(pSeq);
+                else 
pDocShell->MakeDrawLayer()->ReadUserDataSequenceValue(pSeq);
             }
         }
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to