Browse Source

Fixed NullReferenceException when hovering over Name property in loose XAML files.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3079 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
87b988cc79
  1. 2
      src/AddIns/BackendBindings/XamlBinding/Project/Src/XamlResolver.cs

2
src/AddIns/BackendBindings/XamlBinding/Project/Src/XamlResolver.cs

@ -149,7 +149,7 @@ namespace XamlBinding @@ -149,7 +149,7 @@ namespace XamlBinding
return new MethodGroupResolveResult(callingClass, null, callingClass.DefaultReturnType, expression);
}
if (propertyOrEvent.Name == "Name") {
if (propertyOrEvent.Name == "Name" && callingClass != null) {
foreach (IField f in callingClass.Fields) {
if (f.Name == expression)
return new MemberResolveResult(callingClass, null, f);

Loading…
Cancel
Save