From dfe463ca2355e7e12cf0259c334dd55d1e9589d7 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 10 Feb 2016 01:08:53 +0000 Subject: [PATCH] Fixed potential crash with frmContactEditorSound in Edit mode. This would be caused because no checks were made on the iterator to see if it was valid or not. --- source/contacteditor/frmContactEditorSound.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/contacteditor/frmContactEditorSound.cpp b/source/contacteditor/frmContactEditorSound.cpp index 4e873f1..3c92b7c 100644 --- a/source/contacteditor/frmContactEditorSound.cpp +++ b/source/contacteditor/frmContactEditorSound.cpp @@ -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); -- 2.39.2