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

source/contacteditor/frmContactEditorSound.cpp

index 4e873f1..3c92b7c 100644 (file)
@@ -331,8 +331,9 @@ void frmContactEditorSound::SetEditorMode(bool EditMode)
                
                intiter = SoundListPrefPtr->find(SoundListIndex);
                
-               if (intiter->first == SoundListIndex && intiter->second > 0){
-               
+               if (intiter->first == SoundListIndex && intiter->second > 0 &&
+                       intiter != SoundListPrefPtr->end()){
+
                        sliPriority->SetValue(intiter->second);
                        sliPriority->Enable();
                        chkUsePref->SetValue(TRUE);
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