starmath: Assert that GetDoc() is non-null here

Change-Id: I694f42a5bf2917e99bdf77d3cf7122cf1bb920ae
Reviewed-on: https://gerrit.libreoffice.org/32596
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
This commit is contained in:
Takeshi Abe 2017-01-02 10:34:54 +09:00
parent 62a97e6a56
commit 20abf5f66b

View File

@ -1305,7 +1305,7 @@ void SmViewShell::SetStatusText(const OUString& rText)
void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc) void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc)
{ {
SAL_WARN_IF( !GetDoc(), "starmath", "Document missing" ); assert(GetDoc());
if (pErrorDesc || nullptr != (pErrorDesc = GetDoc()->GetParser().GetError(0)) ) if (pErrorDesc || nullptr != (pErrorDesc = GetDoc()->GetParser().GetError(0)) )
{ {
SetStatusText( pErrorDesc->m_aText ); SetStatusText( pErrorDesc->m_aText );
@ -1316,7 +1316,7 @@ void SmViewShell::ShowError(const SmErrorDesc* pErrorDesc)
void SmViewShell::NextError() void SmViewShell::NextError()
{ {
SAL_WARN_IF( !GetDoc(), "starmath", "Document missing" ); assert(GetDoc());
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().NextError(); const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().NextError();
if (pErrorDesc) if (pErrorDesc)
@ -1325,7 +1325,7 @@ void SmViewShell::NextError()
void SmViewShell::PrevError() void SmViewShell::PrevError()
{ {
SAL_WARN_IF( !GetDoc(), "starmath", "Document missing" ); assert(GetDoc());
const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().PrevError(); const SmErrorDesc *pErrorDesc = GetDoc()->GetParser().PrevError();
if (pErrorDesc) if (pErrorDesc)