Mercurial > hg > forks > UniversalIndentGUI
changeset 12:a0cd78840b06
[fix] Error occurred when no main program ini file exists at start and no indenters ini files are found. The number of found indenters is then zero and was being decremented by one, which caused an illegal id of -1.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@169 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Wed, 18 Oct 2006 19:18:05 +0000 |
parents | 3ae506fd48d2 |
children | df9e8d3c040e |
files | src/mainwindow.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mainwindow.cpp Tue Oct 17 18:21:33 2006 +0000 +++ b/src/mainwindow.cpp Wed Oct 18 19:18:05 2006 +0000 @@ -644,7 +644,7 @@ if ( indenterID < 0 ) { indenterID = 0; } - if ( indenterID >= indentHandler->getAvailableIndenters().count() ) { + if ( indenterID >= indentHandler->getAvailableIndenters().count() && indenterID != 0 ) { indenterID = indentHandler->getAvailableIndenters().count() - 1; }