sfx2/source/doc/new.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4b45c90c959fff95feecc5e252f934aa4e366659
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Jan 10 09:43:51 2019 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Jan 11 13:49:34 2019 +0100

    Resolves: tdf#122611 crash in empty template list
    
    Change-Id: Ifab72f21e92382a3072a35447c6387e1fd405e15
    Reviewed-on: https://gerrit.libreoffice.org/66104
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org>
    Tested-by: Xisco Faulí <xiscofa...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 0c8f6d21513c..6c305d76105e 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -182,7 +182,8 @@ IMPL_LINK( SfxNewFileDialog, RegionSelect, weld::TreeView&, 
rBox, void )
     for (sal_uInt16 i = 0; i < nCount; ++i)
         m_xTemplateLb->append_text(m_aTemplates.GetName(nRegion, i));
     m_xTemplateLb->thaw();
-    m_xTemplateLb->select(0);
+    if (nCount)
+        m_xTemplateLb->select(0);
     TemplateSelect(*m_xTemplateLb);
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to