Browse Source

Fixed forum-17249: NullReferenceException in MergeFormChanges if the form contains a VB field without datatype.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2537 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
7a158a9340
  1. 2
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs

2
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/DesignerGenerator/AbstractDesignerGenerator.cs

@ -231,10 +231,12 @@ namespace ICSharpCode.FormsDesigner
bool FieldChanged(IField oldField, CodeMemberField newField) bool FieldChanged(IField oldField, CodeMemberField newField)
{ {
// compare types // compare types
if (oldField.ReturnType != null) { // ignore type changes to untyped VB fields
if (oldField.ReturnType.FullyQualifiedName != newField.Type.BaseType) { if (oldField.ReturnType.FullyQualifiedName != newField.Type.BaseType) {
LoggingService.Debug("FieldChanged: "+oldField.Name+", "+oldField.ReturnType.FullyQualifiedName+" -> "+newField.Type.BaseType); LoggingService.Debug("FieldChanged: "+oldField.Name+", "+oldField.ReturnType.FullyQualifiedName+" -> "+newField.Type.BaseType);
return true; return true;
} }
}
// compare modifiers // compare modifiers
ModifierEnum oldModifiers = oldField.Modifiers & ModifierEnum.VisibilityMask; ModifierEnum oldModifiers = oldField.Modifiers & ModifierEnum.VisibilityMask;

Loading…
Cancel
Save