[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Sat Jul 30 20:31:48 UTC 2016


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

New commits:
commit 1144523f1404dc6532ced2c9c7ba9fffd37b3704
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>
    (cherry picked from commit 71835fd8b5b04651e5be38b3b26a8dc80f5c3355)
    Reviewed-on: https://gerrit.libreoffice.org/27732
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.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