diff options
author | Pranav Kant <pranavk@collabora.com> | 2016-02-21 01:28:56 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.com> | 2016-02-21 22:14:40 +0530 |
commit | f4e13bc973ed50bed80f2833dc8e5bc7a69bb44e (patch) | |
tree | 657eecd0bd5f662e3f508ed7ef88f243db6045fd /libreofficekit/source | |
parent | dbd7ce16d621bf992a763317174c85a5d9f3b5ea (diff) |
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
Diffstat (limited to 'libreofficekit/source')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index e771b0504866..3ecf52ccf6c7 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -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)); |