From f120479d88cff385cc0025903b1e213f28d6b17a Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 3 Feb 2005 14:27:24 +0000 Subject: [PATCH] 2005-02-03 Mike Kestner * glib/ObjectManager.cs (GetValidParentType): return null if G_TYPE_INVALID is returned from glue. [Fixes #72150] svn path=/trunk/gtk-sharp/; revision=40063 --- ChangeLog | 5 +++++ glib/ObjectManager.cs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index cfc8720f3..312de89a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-03 Mike Kestner + + * glib/ObjectManager.cs (GetValidParentType): return null if + G_TYPE_INVALID is returned from glue. [Fixes #72150] + 2005-02-02 Mike Kestner * generator/Signal.cs : kill unnecessary BaseName prop. diff --git a/glib/ObjectManager.cs b/glib/ObjectManager.cs index f93aa9792..4907cbb80 100644 --- a/glib/ObjectManager.cs +++ b/glib/ObjectManager.cs @@ -139,6 +139,8 @@ namespace GLib { // We will always end up at GObject and will break this loop while (true) { type_id = gtksharp_get_parent_type (type_id); + if (type_id == 0) + return null; typename = Marshal.PtrToStringAnsi (gtksharp_get_type_name_for_id (type_id)); if (types.ContainsKey (typename)) mangled = (string)types[typename];