mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
gtk: Fix crash in CellRenderer.OnGetSize callback
Handle the case when the native cell_area is not set.
This commit is contained in:
parent
a85ebc481f
commit
23a0aa7af2
@ -54,7 +54,9 @@
|
||||
try {
|
||||
CellRenderer obj = GLib.Object.GetObject (item, false) as CellRenderer;
|
||||
Gtk.Widget widg = GLib.Object.GetObject (widget, false) as Gtk.Widget;
|
||||
Gdk.Rectangle cell_area = Gdk.Rectangle.New (cell_area_ptr);
|
||||
Gdk.Rectangle cell_area = Gdk.Rectangle.Zero;
|
||||
if (cell_area_ptr != IntPtr.Zero)
|
||||
cell_area = Gdk.Rectangle.New (cell_area_ptr);
|
||||
int a, b, c, d;
|
||||
|
||||
obj.OnGetSize (widg, ref cell_area, out a, out b, out c, out d);
|
||||
|
Loading…
Reference in New Issue
Block a user