mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-08 07:53:17 +02:00
2009-01-07 Mike Kestner <mkestner@novell.com>
* generator/MethodBody.cs: avoid null ref when passing null to destroy notified callback parameters. [Fixes #464120] svn path=/trunk/gtk-sharp/; revision=122677
This commit is contained in:
parent
b9af715527
commit
f38c129f6d
@ -1,3 +1,8 @@
|
|||||||
|
2009-01-07 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* generator/MethodBody.cs: avoid null ref when passing null to
|
||||||
|
destroy notified callback parameters. [Fixes #464120]
|
||||||
|
|
||||||
2009-01-06 Mike Kestner <mkestner@novell.com>
|
2009-01-06 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* configure.in.in: update to use mdoc.
|
* configure.in.in: update to use mdoc.
|
||||||
|
@ -103,16 +103,13 @@ namespace GtkSharp.Generation {
|
|||||||
string wrapper = cbgen.GenWrapper(gen_info);
|
string wrapper = cbgen.GenWrapper(gen_info);
|
||||||
switch (p.Scope) {
|
switch (p.Scope) {
|
||||||
case "notified":
|
case "notified":
|
||||||
sw.WriteLine (indent + "\t\t\t{0} {1}_wrapper;", wrapper, name);
|
sw.WriteLine (indent + "\t\t\t{0} {1}_wrapper = new {0} ({1});", wrapper, name);
|
||||||
sw.WriteLine (indent + "\t\t\tIntPtr {0};", parameters [i + 1].Name);
|
sw.WriteLine (indent + "\t\t\tIntPtr {0};", parameters [i + 1].Name);
|
||||||
sw.WriteLine (indent + "\t\t\t{0} {1};", parameters [i + 2].CSType, parameters [i + 2].Name);
|
sw.WriteLine (indent + "\t\t\t{0} {1};", parameters [i + 2].CSType, parameters [i + 2].Name);
|
||||||
sw.WriteLine (indent + "\t\t\tif ({0} == null) {{", name);
|
sw.WriteLine (indent + "\t\t\tif ({0} == null) {{", name);
|
||||||
sw.WriteLine (indent + "\t\t\t\t{0}_wrapper = null;", name);
|
|
||||||
sw.WriteLine (indent + "\t\t\t\t{0} = IntPtr.Zero;", parameters [i + 1].Name);
|
sw.WriteLine (indent + "\t\t\t\t{0} = IntPtr.Zero;", parameters [i + 1].Name);
|
||||||
sw.WriteLine (indent + "\t\t\t\t{0} = null;", parameters [i + 2].Name);
|
sw.WriteLine (indent + "\t\t\t\t{0} = null;", parameters [i + 2].Name);
|
||||||
sw.WriteLine (indent + "\t\t\t} else {");
|
sw.WriteLine (indent + "\t\t\t} else {");
|
||||||
|
|
||||||
sw.WriteLine (indent + "\t\t\t\t{0}_wrapper = new {1} ({0});", name, wrapper);
|
|
||||||
sw.WriteLine (indent + "\t\t\t\t{0} = (IntPtr) GCHandle.Alloc ({1}_wrapper);", parameters [i + 1].Name, name);
|
sw.WriteLine (indent + "\t\t\t\t{0} = (IntPtr) GCHandle.Alloc ({1}_wrapper);", parameters [i + 1].Name, name);
|
||||||
sw.WriteLine (indent + "\t\t\t\t{0} = GLib.DestroyHelper.NotifyHandler;", parameters [i + 2].Name, parameters [i + 2].CSType);
|
sw.WriteLine (indent + "\t\t\t\t{0} = GLib.DestroyHelper.NotifyHandler;", parameters [i + 2].Name, parameters [i + 2].CSType);
|
||||||
sw.WriteLine (indent + "\t\t\t}");
|
sw.WriteLine (indent + "\t\t\t}");
|
||||||
|
Loading…
Reference in New Issue
Block a user