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

source/contacteditor/frmContactEditorCategory.cpp

index eba5dad..bf2d4ea 100644 (file)
@@ -213,7 +213,8 @@ void frmContactEditorCategory::SetEditorMode(bool EditMode)
                
                striter = CategoryListTypePtr->find(CategoryListIndex); 
                
-               if (striter->first == CategoryListIndex){
+               if (striter->first == CategoryListIndex &&
+                       striter != CategoryListTypePtr->end()){
                
                        strValue = striter->second;
                
@@ -237,7 +238,8 @@ void frmContactEditorCategory::SetEditorMode(bool EditMode)
                
                intiter = CategoryListPrefPtr->find(CategoryListIndex);
                
-               if (intiter->first == CategoryListIndex && intiter->second > 0){
+               if (intiter->first == CategoryListIndex && intiter->second > 0 &&
+                       intiter != CategoryListPrefPtr->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