[Libreoffice-commits] core.git: sc/source
Caolán McNamara
caolanm at redhat.com
Tue Jan 30 20:32:36 UTC 2018
sc/source/core/tool/formulalogger.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit c38f11918568f33400f7f774c591f76926fe2755
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 30 10:32:00 2018 +0000
ofz#5834 Null-dereference
Change-Id: If52162286c949bd8c4f283ca8669fb1a99a61b0c
Reviewed-on: https://gerrit.libreoffice.org/48897
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/core/tool/formulalogger.cxx b/sc/source/core/tool/formulalogger.cxx
index 3b12f09192b0..f202ac35414f 100644
--- a/sc/source/core/tool/formulalogger.cxx
+++ b/sc/source/core/tool/formulalogger.cxx
@@ -339,7 +339,7 @@ FormulaLogger::GroupScope FormulaLogger::enterGroup(
{
// Get the file name if available.
const SfxObjectShell* pShell = rDoc.GetDocumentShell();
- const SfxMedium* pMedium = pShell->GetMedium();
+ const SfxMedium* pMedium = pShell ? pShell->GetMedium() : nullptr;
OUString aName;
if (pMedium)
aName = pMedium->GetURLObject().GetLastName();
More information about the Libreoffice-commits
mailing list