Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fixed potential crash with frmContactEditorNickname in Edit mode.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 9 Feb 2016 23:58:03 +0000 (23:58 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 9 Feb 2016 23:58:03 +0000 (23:58 +0000)
This would be caused because no checks were made on the iterator to see
if it was valid or not.

source/contacteditor/frmContactEditorNickname.cpp

index 62937af..c0ecc2f 100644 (file)
@@ -198,7 +198,8 @@ void frmContactEditorNickname::SetEditorMode(bool EditMode, SectionType SectType
                
                striter = NicknamesListLanguagePtr->find(NicknamesListIndex);
                 
-               if (striter->first == NicknamesListIndex){
+               if (striter->first == NicknamesListIndex &&
+                       striter != NicknamesListLanguagePtr->end()){
                
                        strValue = striter->second;
                
@@ -211,7 +212,8 @@ void frmContactEditorNickname::SetEditorMode(bool EditMode, SectionType SectType
                
                intiter = NicknamesListPrefPtr->find(NicknamesListIndex);
                
-               if (intiter->first == NicknamesListIndex && intiter->second > 0){
+               if (intiter->first == NicknamesListIndex && intiter->second > 0 &&
+                       intiter != NicknamesListPrefPtr->end()){
                
                        sliPriority->SetValue(intiter->second);
                        sliPriority->Enable();
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy