Gtk.Container.gtksharp_container_base_forall & CellRenderer.gtksharp_cellrenderer_base_get_size: check if obj is null

This commit is contained in:
lytico 2020-05-28 22:54:23 +02:00
parent ede043d466
commit 79db23fd80
2 changed files with 5 additions and 0 deletions

View file

@ -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) {

View file

@ -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_")) {