B2014-109: Fix crash on section delete – cache list was updated by sub-code and then enumeration crashed.
This commit is contained in:
parent
8c85f817d1
commit
fd96809f2a
@ -669,9 +669,16 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ConvertListToDictionary();
|
ConvertListToDictionary();
|
||||||
string key = itemID.ToString();
|
string key = itemID.ToString();
|
||||||
if (_CacheByPrimaryKey.ContainsKey(key))
|
if (_CacheByPrimaryKey.ContainsKey(key))
|
||||||
foreach (ItemInfo item in _CacheByPrimaryKey[key])
|
{
|
||||||
|
// Create a temporary list to process cache entries then use
|
||||||
|
// the temporary list which may have a side effect on the cache entries,
|
||||||
|
// thus the need for the temporary list.
|
||||||
|
List<ItemInfo> myCache = new List<ItemInfo>();
|
||||||
|
foreach (ItemInfo item in _CacheByPrimaryKey[key]) myCache.Add(item);
|
||||||
|
foreach (ItemInfo item in myCache)
|
||||||
item.OnOrdinalChange();
|
item.OnOrdinalChange();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public bool IsFirstSubStep
|
public bool IsFirstSubStep
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
Loading…
x
Reference in New Issue
Block a user