Author: mhutch
Date: 2007-08-30 18:55:49 -0400 (Thu, 30 Aug 2007)
New Revision: 85081
Modified:
trunk/monodevelop/Extras/WelcomePage/ChangeLog
trunk/monodevelop/Extras/WelcomePage/WelcomePageView.cs
Log:
2007-08-31 Michael Hutchinson <[EMAIL PROTECTED]>
* WelcomePageView.cs: Dispose resource streams, to avoid an exception
in
RecentChangesHandler that prevented opening projects.
Modified: trunk/monodevelop/Extras/WelcomePage/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/WelcomePage/ChangeLog 2007-08-30 20:58:04 UTC
(rev 85080)
+++ trunk/monodevelop/Extras/WelcomePage/ChangeLog 2007-08-30 22:55:49 UTC
(rev 85081)
@@ -1,3 +1,8 @@
+2007-08-31 Michael Hutchinson <[EMAIL PROTECTED]>
+
+ * WelcomePageView.cs: Dispose resource streams, to avoid an exception
in
+ RecentChangesHandler that prevented opening projects.
+
2007-08-28 Mike Krüger <[EMAIL PROTECTED]>
* WelcomePageView.cs, WelcomePageCommands.cs: Fixed 81660+82491: Crash
when
Modified: trunk/monodevelop/Extras/WelcomePage/WelcomePageView.cs
===================================================================
--- trunk/monodevelop/Extras/WelcomePage/WelcomePageView.cs 2007-08-30
20:58:04 UTC (rev 85080)
+++ trunk/monodevelop/Extras/WelcomePage/WelcomePageView.cs 2007-08-30
22:55:49 UTC (rev 85081)
@@ -110,7 +110,9 @@
arg.AddExtensionObject
("urn:MonoDevelop.Core.XslGettextCatalog", new
MonoDevelop.Core.XslGettextCatalog ());
XslTransform xslt = new XslTransform();
- xslt.Load (new XmlTextReader
(Assembly.GetExecutingAssembly().GetManifestResourceStream
("WelcomePage.xsl")));
+ using (Stream stream =
Assembly.GetExecutingAssembly().GetManifestResourceStream ("WelcomePage.xsl")) {
+ xslt.Load (new XmlTextReader (stream));
+ }
StringWriter fs = new StringWriter ();
xslt.Transform (inxml, arg, fs, null);
@@ -191,7 +193,9 @@
private XmlDocument BuildXmlDocument()
{
XmlDocument xml = new XmlDocument();
- xml.Load (new XmlTextReader
(Assembly.GetExecutingAssembly().GetManifestResourceStream
("WelcomePageContent.xml")));
+ using (Stream stream =
Assembly.GetExecutingAssembly().GetManifestResourceStream
("WelcomePageContent.xml")) {
+ xml.Load (new XmlTextReader (stream));
+ }
// Get the Parent node
XmlNode parent = xml.SelectSingleNode ("/WelcomePage");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches