libreofficekit/source/gtk/lokdocview.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e518a58dad658cd8aaad10a11816e35ab8bfa07c
Author: Caolán McNamara <caol...@redhat.com>
Date:   Thu Dec 21 16:19:42 2017 +0000

    rhbz#1527945 segv on failed open of password protected doc in 
gnome-documents
    
    Change-Id: I1bec502ae20d03214c673d8911792c89669c0fe9
    Reviewed-on: https://gerrit.libreoffice.org/46922
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 3abc2949cae4..2735c77b9f75 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2235,7 +2235,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 );
@@ -2243,6 +2242,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);
     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to