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

source/contacteditor/frmContactEditorVendor.cpp

index 4696a9d..ce56648 100644 (file)
@@ -67,7 +67,8 @@ void frmContactEditorVendor::SetEditorMode(bool EditMode)
 
                striter = VendorListElementPtr->find(VendorListIndex);
                 
-               if (striter->first == VendorListIndex){
+               if (striter->first == VendorListIndex &&
+                       striter != VendorListElementPtr->end()){
                
                        strValue = striter->second;
                
@@ -81,7 +82,8 @@ void frmContactEditorVendor::SetEditorMode(bool EditMode)
                
                striter = VendorListPtr->find(VendorListIndex);
                 
-               if (striter->first == VendorListIndex){
+               if (striter->first == VendorListIndex &&
+                       striter != VendorListPtr->end()){
                
                        strValue = striter->second;
                
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