tdf#97235: Protect reset_view when called with no tile buffer initialized

This can happen when no document has been loaded yet.

Change-Id: Ib9c18e22b6c344528d05eb781bf9b3052060089a
This commit is contained in:
Pranav Kant 2016-02-21 01:28:56 +05:30
parent dbd7ce16d6
commit f4e13bc973

View File

@ -2825,7 +2825,9 @@ SAL_DLLPUBLIC_EXPORT void
lok_doc_view_reset_view(LOKDocView* pDocView)
{
LOKDocViewPrivate& priv = getPrivate(pDocView);
priv->m_pTileBuffer->resetAllTiles();
if (priv->m_pTileBuffer != nullptr)
priv->m_pTileBuffer->resetAllTiles();
priv->m_nLoadProgress = 0.0;
memset(&priv->m_aVisibleCursor, 0, sizeof(priv->m_aVisibleCursor));