Changeset 1713 for trunk/eraser6


Ignore:
Timestamp:
1/28/2010 6:54:10 AM (5 years ago)
Author:
lowjoel
Message:

Since we only force the creation of the SchedulerPanel?'s handle in the constructor, InvokeRequired? should be called on the panel itself, and not on subcontrols as they are still delay-constructed. Fixes crash when Eraser is started quietly and a task is created remotely.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6/Eraser/SchedulerPanel.cs

    r1697 r1713  
    187187        void task_TaskStarted(object sender, TaskEventArgs e) 
    188188        { 
    189             if (scheduler.InvokeRequired) 
     189            if (InvokeRequired) 
    190190            { 
    191191                Invoke(new EventHandler<TaskEventArgs>(task_TaskStarted), sender, e); 
     
    213213            //Make sure we handle the event in the main thread as this requires 
    214214            //GUI calls. 
    215             if (scheduler.InvokeRequired) 
     215            if (InvokeRequired) 
    216216            { 
    217217                Invoke((EventHandler<ProgressChangedEventArgs>)task_ProgressChanged, sender, e); 
Note: See TracChangeset for help on using the changeset viewer.