Browse Source

Fixed NullReferenceException in the exception handling code for the forms designer initialization when an exception is thrown before the DesignSurface is created.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2525 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Christian Hornung 18 years ago
parent
commit
aba3c746f3
  1. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs

2
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerViewContent.cs

@ -243,7 +243,7 @@ namespace ICSharpCode.FormsDesigner @@ -243,7 +243,7 @@ namespace ICSharpCode.FormsDesigner
errorText.Text = e.InnerException.Message;
} else if (e is FormsDesignerLoadException) {
errorText.Text = e.Message;
} else if (!designSurface.IsLoaded && designSurface.LoadErrors != null) {
} else if (designSurface != null && !designSurface.IsLoaded && designSurface.LoadErrors != null) {
errorText.Text = StringParser.Parse("${res:ICSharpCode.SharpDevelop.FormDesigner.ErrorLoadingDesigner}\r\n\r\n");
foreach(Exception le in designSurface.LoadErrors) {
errorText.Text += le.ToString();

Loading…
Cancel
Save