Fixed a glaring bug in the ProgressReporter which could throw exceptions into the ProgressChanged event handler (race condition between dialog setup and first progress message)
git-svn-id: file:///srv/devel/repo-conversion/nuwi@21 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
6ab7e999ad
commit
1063c4f0f2
|
@ -104,6 +104,11 @@ namespace Nuclex.Windows.Forms {
|
|||
this.abortReceiver = (progression as IAbortable);
|
||||
this.cancelButton.Enabled = (this.abortReceiver != null);
|
||||
|
||||
// Make sure the progress bar control has been created (otherwise, we've got
|
||||
// a chance that BeginInvoke() would fail if the first progress notification
|
||||
// arrived before we called ShowDialog()!)
|
||||
IntPtr tempDummy = this.progressBar.Handle;
|
||||
|
||||
// Subscribe the form to the progression it is supposed to monitor
|
||||
progression.AsyncEnded += this.asyncEndedDelegate;
|
||||
IProgressReporter progressReporter = progression as IProgressReporter;
|
||||
|
|
Loading…
Reference in New Issue
Block a user