* GuiExternal.cpp:

- do not use invalid index if a template is not found. Fixes crash bug #6259.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31567 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-10-09 12:08:47 +00:00
parent 08192ea2dc
commit 2c6f0ae445

View File

@ -461,7 +461,7 @@ void GuiExternal::updateContents()
params_.filename.outputFilename(fromqstr(bufferFilepath())); params_.filename.outputFilename(fromqstr(bufferFilepath()));
fileED->setText(toqstr(name)); fileED->setText(toqstr(name));
int index = -1; int index = 0;
external::TemplateManager::Templates::const_iterator i1, i2; external::TemplateManager::Templates::const_iterator i1, i2;
i1 = external::TemplateManager::get().getTemplates().begin(); i1 = external::TemplateManager::get().getTemplates().begin();
i2 = external::TemplateManager::get().getTemplates().end(); i2 = external::TemplateManager::get().getTemplates().end();