From 20abf5f66b77bf0975eb93cb291af7ea79a45089 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Mon, 2 Jan 2017 10:34:54 +0900 Subject: starmath: Assert that GetDoc() is non-null here Change-Id: I694f42a5bf2917e99bdf77d3cf7122cf1bb920ae Reviewed-on: https://gerrit.libreoffice.org/32596 Tested-by: Jenkins Reviewed-by: Takeshi Abe --- starmath/source/view.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'starmath') diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index df0edfcf7ba3..e04640009092 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1305,7 +1305,7 @@ void SmViewShell::SetStatusText(const OUString& rText) void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc) { - SAL_WARN_IF( !GetDoc(), "starmath", "Document missing" ); + assert(GetDoc()); if (pErrorDesc || nullptr != (pErrorDesc = GetDoc()->GetParser().GetError(0)) ) { SetStatusText( pErrorDesc->m_aText ); @@ -1316,7 +1316,7 @@ void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc) void SmViewShell::NextError() { - SAL_WARN_IF( !GetDoc(), "starmath", "Document missing" ); + assert(GetDoc()); const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().NextError(); if (pErrorDesc) @@ -1325,7 +1325,7 @@ void SmViewShell::NextError() void SmViewShell::PrevError() { - SAL_WARN_IF( !GetDoc(), "starmath", "Document missing" ); + assert(GetDoc()); const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().PrevError(); if (pErrorDesc) -- cgit