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 | |
parent | tdf#97236: Refresh the view when part is changed (diff) | |
download | core-f4e13bc973ed50bed80f2833dc8e5bc7a69bb44e.tar.gz core-f4e13bc973ed50bed80f2833dc8e5bc7a69bb44e.zip |
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')
-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)); |