diff options
author | Andres G. Aragoneses <andres1204@andresubuntu.(none)> | 2012-05-31 04:38:57 +0400 |
---|---|---|
committer | Andres G. Aragoneses <andres1204@andresubuntu.(none)> | 2012-05-31 04:38:57 +0400 |
commit | c6f4bc351e34e4608bea924b0a509d52025718d8 (patch) | |
tree | b781abf9d411a215817b2a0fc0890cbd4472f8e7 /main/src | |
parent | 6b3acc3e896b8f597d4af574426c9d1b56886aa9 (diff) |
[Autotools] Dispose the IProgressMonitor when done
Use a 'using' clause so the status monitor is disposed when the
updating operation finishes.
Fixes bug #5425.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs b/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs index 749d767ab2..c003789327 100644 --- a/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs +++ b/main/src/addins/MonoDevelop.Autotools/MakefileOptionPanelWidget.cs @@ -268,10 +268,11 @@ namespace MonoDevelop.Autotools //FIXME: Do this only if there are changes b/w tmpData and Data project.ExtendedProperties ["MonoDevelop.Autotools.MakefileInfo"] = tmpData; - IProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetStatusProgressMonitor ( - GettextCatalog.GetString ("Updating project"), "gtk-run", true); + using (IProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetStatusProgressMonitor ( + GettextCatalog.GetString ("Updating project"), "gtk-run", true)) { - tmpData.UpdateProject (monitor, oldData == null || (!oldData.IntegrationEnabled && tmpData.IntegrationEnabled)); + tmpData.UpdateProject (monitor, oldData == null || (!oldData.IntegrationEnabled && tmpData.IntegrationEnabled)); + } } else { if (oldData != null) oldData.IntegrationEnabled = false; |