gtk: Handle a null Gdk.Event passed to CellRenderer.StartEditing()

Cherry-picked from the gtk-sharp-2.12 branch.
This commit is contained in:
Jeffrey Stedfast 2013-08-18 18:11:26 +02:00 committed by Bertrand Lorentz
parent 100696b5c1
commit d3c1826c37

View File

@ -34,7 +34,7 @@ namespace Gtk {
public ICellEditable StartEditing (Widget widget, Gdk.Event evnt, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags)
{
IntPtr native = GLib.Marshaller.StringToPtrGStrdup (path);
IntPtr raw_ret = gtk_cell_renderer_start_editing (Handle, evnt.Handle, widget.Handle, native, ref background_area, ref cell_area, (int) flags);
IntPtr raw_ret = gtk_cell_renderer_start_editing (Handle, evnt != null ? evnt.Handle : IntPtr.Zero, widget.Handle, native, ref background_area, ref cell_area, (int) flags);
GLib.Marshaller.Free (native);
var ret = (ICellEditable) GLib.Object.GetObject (raw_ret);
return ret;