Browse Source

Fixed SD2-1257. Fixed a null reference exception in the AddComponentsDialog that could occur when listing the components from a file which is not a .NET assembly.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2255 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 19 years ago
parent
commit
9b330200f4
  1. 6
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs

6
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/AddComponentsDialog.cs

@ -68,7 +68,11 @@ namespace ICSharpCode.FormsDesigner.Gui @@ -68,7 +68,11 @@ namespace ICSharpCode.FormsDesigner.Gui
{
if (componentListView.Items.Count == 0) {
if (componentListView.Controls.Count == 0) {
ClearComponentsList(StringParser.Parse("${res:ICSharpCode.SharpDevelop.FormDesigner.Gui.AddSidebarComponents.NoComponentsFound}", new string[,] {{"Name", lastAssembly.FullName}}));
string name = String.Empty;
if (lastAssembly != null) {
name = lastAssembly.FullName;
}
ClearComponentsList(StringParser.Parse("${res:ICSharpCode.SharpDevelop.FormDesigner.Gui.AddSidebarComponents.NoComponentsFound}", new string[,] {{"Name", name}}));
}
}
componentListView.EndUpdate();

Loading…
Cancel
Save