mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-08 22:45:43 +00:00
Gtk.Container.gtksharp_container_base_forall & CellRenderer.gtksharp_cellrenderer_base_get_size: check if obj is null
This commit is contained in:
parent
ede043d466
commit
79db23fd80
|
@ -127,6 +127,8 @@ namespace Gtk
|
||||||
}
|
}
|
||||||
|
|
||||||
var obj = TryGetObject (cell);
|
var obj = TryGetObject (cell);
|
||||||
|
if (obj == default)
|
||||||
|
return;
|
||||||
var parent = obj.NativeType;
|
var parent = obj.NativeType;
|
||||||
while ((parent = parent.GetBaseType ()) != GLib.GType.None) {
|
while ((parent = parent.GetBaseType ()) != GLib.GType.None) {
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,9 @@ namespace Gtk
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var obj = TryGetObject(container);
|
var obj = TryGetObject(container);
|
||||||
|
if (obj == default)
|
||||||
|
return;
|
||||||
|
|
||||||
var parent = obj.NativeType;
|
var parent = obj.NativeType;
|
||||||
while ((parent = parent.GetBaseType()) != GLib.GType.None) {
|
while ((parent = parent.GetBaseType()) != GLib.GType.None) {
|
||||||
if (parent.ToString().StartsWith("__gtksharp_")) {
|
if (parent.ToString().StartsWith("__gtksharp_")) {
|
||||||
|
|
Loading…
Reference in a new issue