Hi to all!

I have following method with its code:
Qt Code:
  1. qint16 CApplicationSettings::searchSettingsForIndex(const QString& strHub, const QString& strKey)
  2. {
  3. if(m_SettingsValues.size()>0)
  4. for (qint16 iIndex=0; iIndex=m_SettingsValues.size(); iIndex++)
  5. if(m_SettingsValues.at(iIndex).strHub==strHub)
  6. if(m_SettingsValues.at(iIndex).strKey==strKey)
  7. return iIndex; // returns index of found record
  8.  
  9. return RECORD_NOT_FOUND; // not found
  10. }
To copy to clipboard, switch view to plain text mode 
Once called, the application crashes with following error:
Qt Code:
  1. warning: Lowest section in C:\WINDOWS\system32\xpsp2res.dll is .rsrc at 20001000
  2. warning: QLayout: Cannot add null widget to QHBoxLayout/
  3.  
  4. Current language: auto; currently c++
  5. warning: ASSERT failure in QList<T>::at: "index out of range", file ../../../../Qt/4.3.4/include/QtCore/../../src/corelib/tools/qlist.h, line 391
To copy to clipboard, switch view to plain text mode 
It is obvious I try to read out of range record, but I simply do not get it why? This code seems perfect to me ... The app crashes in line 5 of method, in the first comparsion.