summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-01-10 09:43:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-01-10 14:49:32 +0100
commit888957648d15c60cd5849f8f8c2bdf55a3b78da8 (patch)
tree871959d70861268400f138909f820da8e744d9a0 /sfx2
parent50bc5c2da75de1dec8e467fc4126687d3ffbb3fc (diff)
Resolves: tdf#122611 crash in empty template list
Change-Id: Ifab72f21e92382a3072a35447c6387e1fd405e15 Reviewed-on: https://gerrit.libreoffice.org/66070 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/new.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index d6d45c7f14e5..ed196a0a384d 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -184,7 +184,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);
}