[Libreoffice-commits] core.git: sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Jul 30 18:09:17 UTC 2016


 sc/source/ui/unoobj/viewuno.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 71835fd8b5b04651e5be38b3b26a8dc80f5c3355
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sat Jul 30 03:03:55 2016 +0200

    missing nullptr check
    
    See
    http://crashreport.libreoffice.org/stats/signature/ScPreviewObj::getSelectedSheets%28%29
    
    Change-Id: I210426b8ac23fdf6b1195afe7dbc388802335e71
    Reviewed-on: https://gerrit.libreoffice.org/27711
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 4c2ffcb..f9081072 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -2343,7 +2343,7 @@ void ScPreviewObj::Notify(SfxBroadcaster&, const SfxHint& rHint)
 uno::Sequence<sal_Int32> ScPreviewObj::getSelectedSheets()
     throw (uno::RuntimeException, std::exception)
 {
-    ScPreview* p = mpViewShell->GetPreview();
+    ScPreview* p = mpViewShell ? mpViewShell->GetPreview() : nullptr;
     if (!p)
         return uno::Sequence<sal_Int32>();
 


More information about the Libreoffice-commits mailing list