Merge pull request #164 from lytico/lytico_checknull_gtkglue
Gtk.Container & Gtk.CellRenderer: nullcheck in glue-methods
This commit is contained in:
commit
17bd972e29
2 changed files with 5 additions and 0 deletions
|
@ -127,6 +127,8 @@ namespace Gtk
|
|||
}
|
||||
|
||||
var obj = TryGetObject (cell);
|
||||
if (obj == default)
|
||||
return;
|
||||
var parent = obj.NativeType;
|
||||
while ((parent = parent.GetBaseType ()) != GLib.GType.None) {
|
||||
|
||||
|
|
|
@ -137,6 +137,9 @@ namespace Gtk
|
|||
return;
|
||||
|
||||
var obj = TryGetObject(container);
|
||||
if (obj == default)
|
||||
return;
|
||||
|
||||
var parent = obj.NativeType;
|
||||
while ((parent = parent.GetBaseType()) != GLib.GType.None) {
|
||||
if (parent.ToString().StartsWith("__gtksharp_")) {
|
||||
|
|
Loading…
Reference in a new issue