2005-12-16 Mike Kestner <mkestner@novell.com>
* gdk/PixbufLoader.custom (InitFromAssemblyResource): move stream access code outside the try block so only the Load is cleaned up with the finally block. Add some other arg checking. [Fixes #76997] svn path=/trunk/gtk-sharp/; revision=54532
This commit is contained in:
parent
6f612e3fff
commit
11fed02148
2 changed files with 16 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-12-16 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gdk/PixbufLoader.custom (InitFromAssemblyResource): move stream
|
||||
access code outside the try block so only the Load is cleaned up with
|
||||
the finally block. Add some other arg checking. [Fixes #76997]
|
||||
|
||||
2005-12-13 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* sources/Makefile.am : move to stable gtk 2.8 versions.
|
||||
|
|
|
@ -73,6 +73,9 @@
|
|||
|
||||
private void InitFromStream (System.IO.Stream stream)
|
||||
{
|
||||
if (stream == null)
|
||||
throw new ArgumentNullException ("stream");
|
||||
|
||||
try {
|
||||
LoadFromStream (stream);
|
||||
} finally {
|
||||
|
@ -93,14 +96,14 @@
|
|||
|
||||
private void InitFromAssemblyResource(System.Reflection.Assembly assembly, string resource)
|
||||
{
|
||||
if (assembly == null)
|
||||
throw new ArgumentNullException ("assembly");
|
||||
|
||||
System.IO.Stream s = assembly.GetManifestResourceStream (resource);
|
||||
if (s == null)
|
||||
throw new ArgumentException ("'" + resource + "' is not a valid resource name of assembly '" + assembly + "'.");
|
||||
|
||||
try {
|
||||
if (resource == null)
|
||||
throw new ArgumentNullException ("resource");
|
||||
|
||||
System.IO.Stream s = assembly.GetManifestResourceStream (resource);
|
||||
if (s == null)
|
||||
throw new ArgumentException ("'" + resource + "' is not a valid resource name of assembly '" + assembly + "'.");
|
||||
|
||||
LoadFromStream (s);
|
||||
} finally {
|
||||
Close ();
|
||||
|
|
Loading…
Reference in a new issue