Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2672


Ignore:
Timestamp:
01/22/10 14:37:04 (15 years ago)
Author:
epitzer
Message:

Add InvokeRequired in Dispose method to prevent cross-thread access exception (#842)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CodeEditor/3.2/CodeEditor.Designer.cs

    r2667 r2672  
    1 namespace HeuristicLab.CodeEditor {
     1using System;
     2namespace HeuristicLab.CodeEditor {
    23  public partial class CodeEditor : System.Windows.Forms.UserControl {
    34    /// <summary>
     
    1112    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    1213    protected override void Dispose(bool disposing) {
    13       if (disposing) {
    14         if (components != null) {
    15           components.Dispose();
     14      if (InvokeRequired) {
     15        Invoke(new Action(() => this.Dispose(disposing)));
     16      } else {
     17        if (disposing) {
     18          if (components != null) {
     19            components.Dispose();
     20          }
    1621        }
     22        base.Dispose(disposing);
    1723      }
    18       base.Dispose(disposing);
    1924    }
    2025
Note: See TracChangeset for help on using the changeset viewer.