summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-12-21 16:19:42 +0000
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-12-22 09:05:55 +0100
commita61f45499856aad9910d82af1312a163504c15c2 (patch)
tree0bf9cd762c3a143e4b5f77777fac8077b5e79096 /libreofficekit
parent6442a8976b4accb53acb902834171ab5f1802d2a (diff)
rhbz#1527945 segv on failed open of password protected doc in gnome-documents
Change-Id: I1bec502ae20d03214c673d8911792c89669c0fe9 Reviewed-on: https://gerrit.libreoffice.org/46923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 81ec84227a2c..08e40736e6f8 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2229,7 +2229,6 @@ openDocumentInThread (gpointer data)
priv->m_pOffice->pClass->registerCallback(priv->m_pOffice, globalCallbackWorker, pDocView);
priv->m_pDocument = priv->m_pOffice->pClass->documentLoad( priv->m_pOffice, priv->m_aDocPath );
- priv->m_eDocumentType = static_cast<LibreOfficeKitDocumentType>(priv->m_pDocument->pClass->getDocumentType(priv->m_pDocument));
if ( !priv->m_pDocument )
{
char *pError = priv->m_pOffice->pClass->getError( priv->m_pOffice );
@@ -2237,6 +2236,7 @@ openDocumentInThread (gpointer data)
}
else
{
+ priv->m_eDocumentType = static_cast<LibreOfficeKitDocumentType>(priv->m_pDocument->pClass->getDocumentType(priv->m_pDocument));
gdk_threads_add_idle(postDocumentLoad, pDocView);
g_task_return_boolean (task, true);
}