Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <jeff@xamarin.com>2012-06-01 00:31:53 +0400
committerJeffrey Stedfast <jeff@xamarin.com>2012-06-01 00:31:53 +0400
commitf7da82d87224009486794739c38fd1a3947d749b (patch)
tree582df6323c8eba425d20876edb8a39c766e1ed3b
parenta6d11f755322a1efcb2673ca09c8034c00ded5fa (diff)
[MacDev] Prevent infinite loop when getting all base class defs
-rwxr-xr-xmain/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
index 43d6767bea..28717c617d 100755
--- a/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
+++ b/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectProjectInfo.cs
@@ -177,15 +177,19 @@ namespace MonoDevelop.MacDev.ObjCIntegration
static IEnumerable<ITypeDefinition> GetAllBaseClassDefinitions (IType type)
{
while (type != null) {
+ IType baseType = null;
+
foreach (var t in type.DirectBaseTypes) {
if (t.Kind != TypeKind.Class)
continue;
var def = t.GetDefinition ();
if (def != null)
yield return def;
- type = t;
+ baseType = t;
break;
}
+
+ type = baseType;
}
}