diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-10 09:43:51 +0000 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-01-10 16:54:00 +0100 |
commit | fe7269ade557171413f78ad7331e16fd1bde03eb (patch) | |
tree | 0201a981b3af2c826951dadc98deeccac9addd8c /sfx2 | |
parent | 3f1e853b7b6d63f4e6fea70a5ef0aa94668ab16e (diff) |
Resolves: tdf#122611 crash in empty template list
Change-Id: Ifab72f21e92382a3072a35447c6387e1fd405e15
Reviewed-on: https://gerrit.libreoffice.org/66071
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/new.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |