Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/11 13:35:33 (14 years ago)
Author:
mkommend
Message:

#1488: Corrected locking of OperatorShapeInfo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Operators.Views.GraphVisualization/3.3/OperatorGraphVisualization/OperatorShapeInfo.cs

    r6029 r6030  
    4747      //mkommend: necessary because cloning a Bitmap is not threadsafe
    4848      //see http://stackoverflow.com/questions/1851292/invalidoperationexception-object-is-currently-in-use-elsewhere for further information
    49       if (original.icon != null) {
    50         lock (lockObject) {
    51           icon = (Bitmap)original.icon.Clone();
    52         }
    53       }
     49      if (original.icon != null) icon = (Bitmap)original.icon.Clone();
    5450
    5551      connectorNames = new List<string>(original.connectorNames);
     
    5753    }
    5854    public override IDeepCloneable Clone(Cloner cloner) {
    59       return new OperatorShapeInfo(this, cloner);
     55      lock (lockObject) {
     56        return new OperatorShapeInfo(this, cloner);
     57      }
    6058    }
    6159
Note: See TracChangeset for help on using the changeset viewer.