Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6031


Ignore:
Timestamp:
04/19/11 13:37:26 (11 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

    r6030 r6031  
    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) icon = (Bitmap)original.icon.Clone();
     49      if (original.icon != null) {
     50        lock (original.lockObject) {
     51          icon = (Bitmap)original.icon.Clone();
     52        }
     53      }
    5054
    5155      connectorNames = new List<string>(original.connectorNames);
     
    5357    }
    5458    public override IDeepCloneable Clone(Cloner cloner) {
    55       lock (lockObject) {
    56         return new OperatorShapeInfo(this, cloner);
    57       }
     59      return new OperatorShapeInfo(this, cloner);
    5860    }
    5961
Note: See TracChangeset for help on using the changeset viewer.