[Monodevelop-patches-list] r1438 - in trunk/MonoDevelop/src/Main/Base: . Gui/Workbench

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Apr 11 17:09:03 EDT 2004


Author: tberman
Date: 2004-04-11 17:09:03 -0400 (Sun, 11 Apr 2004)
New Revision: 1438

Modified:
   trunk/MonoDevelop/src/Main/Base/ChangeLog
   trunk/MonoDevelop/src/Main/Base/Gui/Workbench/WorkbenchMemento.cs
Log:
check for good data


Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-04-11 21:01:21 UTC (rev 1437)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog	2004-04-11 21:09:03 UTC (rev 1438)
@@ -1,5 +1,9 @@
 2004-04-11  Todd Berman  <tberman at sevenl.net>
 
+	* Gui/Workbench/WorkbenchMemento.cs: ugh, check for valid data too.
+
+2004-04-11  Todd Berman  <tberman at sevenl.net>
+
 	* Gui/Workbench/WorkbenchMemento.cs: fix potential nullrefs.
 
 2004-04-11  Todd Berman  <tberman at sevenl.net>

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Workbench/WorkbenchMemento.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Workbench/WorkbenchMemento.cs	2004-04-11 21:01:21 UTC (rev 1437)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Workbench/WorkbenchMemento.cs	2004-04-11 21:09:03 UTC (rev 1438)
@@ -72,14 +72,14 @@
 		
 		WorkbenchMemento(XmlElement element)
 		{
-			if (element.Attributes["bounds"] != null) {
+			if (element.Attributes["bounds"] != null && element.Attributes["bounds"].InnerText != String.Empty) {
 				string[] boundstr = element.Attributes["bounds"].InnerText.Split(new char [] { ',' });
 				
 				bounds = new Rectangle(Int32.Parse(boundstr[0]), Int32.Parse(boundstr[1]), 
 									   Int32.Parse(boundstr[2]), Int32.Parse(boundstr[3]));
 			}
 			
-			if (element.Attributes["formwindowstate"] != null) {
+			if (element.Attributes["formwindowstate"] != null && element.Attributes["formwindowstate"].InnerText != String.Empty) {
 				windowstate = (Gdk.WindowState)Enum.Parse(typeof(Gdk.WindowState), element.Attributes["formwindowstate"].InnerText);
 			}
 			
@@ -87,7 +87,7 @@
 				defaultwindowstate = (FormWindowState)Enum.Parse(typeof(FormWindowState), element.Attributes["defaultformwindowstate"].InnerText);
 			}*/
 
-			if (element.Attributes["fullscreen"] != null) {
+			if (element.Attributes["fullscreen"] != null && element.Attributes["fullscreen"].InnerText != String.Empty) {
 				fullscreen  = Boolean.Parse(element.Attributes["fullscreen"].InnerText);
 			}
 		}




More information about the Monodevelop-patches-list mailing list