mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-03-01 01:56:46 +00:00
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
|
@ -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>
|
2005-12-13 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* sources/Makefile.am : move to stable gtk 2.8 versions.
|
* sources/Makefile.am : move to stable gtk 2.8 versions.
|
||||||
|
|
|
@ -73,6 +73,9 @@
|
||||||
|
|
||||||
private void InitFromStream (System.IO.Stream stream)
|
private void InitFromStream (System.IO.Stream stream)
|
||||||
{
|
{
|
||||||
|
if (stream == null)
|
||||||
|
throw new ArgumentNullException ("stream");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LoadFromStream (stream);
|
LoadFromStream (stream);
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -93,14 +96,14 @@
|
||||||
|
|
||||||
private void InitFromAssemblyResource(System.Reflection.Assembly assembly, string resource)
|
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 {
|
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);
|
LoadFromStream (s);
|
||||||
} finally {
|
} finally {
|
||||||
Close ();
|
Close ();
|
||||||
|
|
Loading…
Reference in a new issue