BUG-2116: for loop over collection which is modified caused a problem.

This commit is contained in:
Robin 2017-01-18 12:00:24 +01:00
parent e5b2b7a5c3
commit 9d849d1b58

@ -27,6 +27,7 @@ using Greenshot.Plugin.Drawing;
using GreenshotPlugin.Interfaces.Drawing;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Greenshot.Drawing.Fields
{
@ -203,7 +204,7 @@ namespace Greenshot.Drawing.Fields
{
return;
}
foreach (var drawableContainer1 in _boundContainers)
foreach (var drawableContainer1 in _boundContainers.ToList())
{
var drawableContainer = (DrawableContainer) drawableContainer1;
if (!drawableContainer.HasField(field.FieldType))