From: Steve Brokenshire Date: Tue, 9 Feb 2016 23:45:52 +0000 (+0000) Subject: Fixed potential crash with frmContactEditorGeoposition in Edit mode. X-Git-Tag: release-0.09~29 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=d25c3dd87e4a6444b4ed56af24d3eb855332449b;p=xestiaab%2F.git Fixed potential crash with frmContactEditorGeoposition in Edit mode. This would be caused because no checks were made on the iterator to see if it was valid or not. --- diff --git a/source/contacteditor/frmContactEditorGeoposition.cpp b/source/contacteditor/frmContactEditorGeoposition.cpp index cfd61bf..e429db7 100644 --- a/source/contacteditor/frmContactEditorGeoposition.cpp +++ b/source/contacteditor/frmContactEditorGeoposition.cpp @@ -76,7 +76,8 @@ void frmContactEditorGeoposition::SetEditorMode(bool EditMode, SectionType SectT intiter = GeopositionListPrefPtr->find(GeopositionListIndex); - if (intiter->first == GeopositionListIndex && intiter->second > 0){ + if (intiter->first == GeopositionListIndex && intiter->second > 0 && + intiter != GeopositionListPrefPtr->end()){ sliPriority->SetValue(intiter->second); sliPriority->Enable();