diff --git a/ChangeLog b/ChangeLog index bf7c380f7..a03fb99b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-12 Andrés G. Aragoneses + + Fixes BNC#426876. + * generator/InterfaceGen.cs: throw ArgumentNullException in + the Adapter's constructor that receives an implementor. + 2008-10-09 Mike Kestner * cairo/*.cs: flatten source hierarchy to simplify win32 build. diff --git a/generator/InterfaceGen.cs b/generator/InterfaceGen.cs index 1b20cb3b9..2319c9839 100644 --- a/generator/InterfaceGen.cs +++ b/generator/InterfaceGen.cs @@ -170,6 +170,8 @@ namespace GtkSharp.Generation { sw.WriteLine (); sw.WriteLine ("\t\tpublic {0}Adapter ({0}Implementor implementor)", Name); sw.WriteLine ("\t\t{"); + sw.WriteLine ("\t\t\tif (implementor == null)"); + sw.WriteLine ("\t\t\t\tthrow new ArgumentNullException (\"implementor\");"); sw.WriteLine ("\t\t\tthis.implementor = implementor;"); sw.WriteLine ("\t\t}"); sw.WriteLine ();