diff --git a/ChangeLog b/ChangeLog index e51a507f0..1b374dcb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-02-10 Gonzalo Paniagua Javier + + * glade/XML.custom: added a couple of checks for null. + 2003-02-09 Duncan Mak * sources/Gtk.metadata: @@ -37,6 +41,10 @@ 2003-02-07 Martin Willemoes Hansen * Added a constructor to gdk/Point.custom +2003-02-07 Gonzalo Paniagua Javier + + * sample/gconf/Makefile: defined top_builddir. RUNTIME is just 'mono'. + 2003-02-06 Duncan Mak * sources/Gtk.metadata: Correct the metadata for the HTMLStream diff --git a/glade/XML.custom b/glade/XML.custom index 6bf2b52ef..23675e925 100644 --- a/glade/XML.custom +++ b/glade/XML.custom @@ -70,6 +70,9 @@ /// correct Glade format public XML (System.IO.Stream s, string root, string domain) { + if (s == null) + throw new ArgumentNullException ("s"); + int size = (int) s.Length; byte[] buffer = new byte[size]; s.Read (buffer, 0, size); @@ -84,10 +87,13 @@ public XML (System.Reflection.Assembly assembly, string resource_name, string root, string domain) { if (assembly == null) - { assembly = System.Reflection.Assembly.GetCallingAssembly (); - } + System.IO.Stream s = assembly.GetManifestResourceStream (resource_name); + if (s == null) + throw new ArgumentException ("Cannot get resource file '" + resource_name + "'", + "resource_name"); + int size = (int) s.Length; byte[] buffer = new byte[size]; s.Read (buffer, 0, size);