X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcontacteditor%2FfrmContactEditorOrganisations.cpp;h=876371035ba37e30b8d33043f2039c4ee2f3b816;hb=c652fc6a8c7adb87cd00a96548d2f6275842f9f8;hp=ccfb5095829ff049526ee9aefc7b4d52528514b7;hpb=45729fca56479bd9158486e0cda0c4a94b4dd1dc;p=xestiaab%2F.git
diff --git a/source/contacteditor/frmContactEditorOrganisations.cpp b/source/contacteditor/frmContactEditorOrganisations.cpp
index ccfb509..8763710 100644
--- a/source/contacteditor/frmContactEditorOrganisations.cpp
+++ b/source/contacteditor/frmContactEditorOrganisations.cpp
@@ -1,3 +1,21 @@
+// frmContactEditorOrganisation.cpp - frmContactEditorOrganisation form.
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Address Book. If not, see
+
#include "frmContactEditorOrganisations.h"
#include
#include "../common/textprocessing.h"
@@ -221,7 +239,8 @@ void frmContactEditorOrganisations::SetEditorMode(bool EditMode, SectionType Sec
striter = OrganisationListSortAsPtr->find(OrganisationListIndex);
- if (striter->first == OrganisationListIndex){
+ if (striter->first == OrganisationListIndex &&
+ striter != OrganisationListSortAsPtr->end()){
strValue = striter->second;
@@ -233,7 +252,8 @@ void frmContactEditorOrganisations::SetEditorMode(bool EditMode, SectionType Sec
intiter = OrganisationListPrefPtr->find(OrganisationListIndex);
- if (intiter->first == OrganisationListIndex && intiter->second > 0){
+ if (intiter->first == OrganisationListIndex && intiter->second > 0 &&
+ intiter != OrganisationListPrefPtr->end()){
sliPriority->SetValue(intiter->second);
sliPriority->Enable();