From c387836fa6782c7efff9ade6bfa18fac21ec0e05 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 11 Oct 2018 18:25:22 +0300 Subject: Don't use GetDBManager() without checking it for nullness Change-Id: Idb7b16a6976df62a1beea8a01c812206a0b8b85a --- sw/source/uibase/app/docsh.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 86d72ac8fb88..8a7d196ea3c2 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -454,7 +454,8 @@ bool SwDocShell::SaveAs( SfxMedium& rMedium ) CalcLayoutForOLEObjects(); // format for OLE objects const bool bURLChanged = !GetMedium() || GetMedium()->GetURLObject() != rMedium.GetURLObject(); - const bool bHasEmbedded = !m_xDoc->GetDBManager()->getEmbeddedName().isEmpty(); + auto pMgr = m_xDoc->GetDBManager(); + const bool bHasEmbedded = pMgr ? !pMgr->getEmbeddedName().isEmpty() : false; bool bSaveDS = bHasEmbedded && bURLChanged; if (bSaveDS) { -- cgit