diff options
Diffstat (limited to 'main/src/addins/MonoDevelop.GtkCore/libstetic')
-rw-r--r-- | main/src/addins/MonoDevelop.GtkCore/libstetic/ImageInfo.cs | 2 | ||||
-rw-r--r-- | main/src/addins/MonoDevelop.GtkCore/libstetic/editor/SelectImageDialog.cs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.GtkCore/libstetic/ImageInfo.cs b/main/src/addins/MonoDevelop.GtkCore/libstetic/ImageInfo.cs index 90e6e17c7b..0a766731d3 100644 --- a/main/src/addins/MonoDevelop.GtkCore/libstetic/ImageInfo.cs +++ b/main/src/addins/MonoDevelop.GtkCore/libstetic/ImageInfo.cs @@ -117,6 +117,8 @@ namespace Stetic } catch { // Not a valid image return WidgetUtils.MissingIcon; + } finally { + s.Dispose (); } case ImageSource.Theme: diff --git a/main/src/addins/MonoDevelop.GtkCore/libstetic/editor/SelectImageDialog.cs b/main/src/addins/MonoDevelop.GtkCore/libstetic/editor/SelectImageDialog.cs index 3f64c92369..c4f6330cb6 100644 --- a/main/src/addins/MonoDevelop.GtkCore/libstetic/editor/SelectImageDialog.cs +++ b/main/src/addins/MonoDevelop.GtkCore/libstetic/editor/SelectImageDialog.cs @@ -207,13 +207,14 @@ namespace Stetic.Editor { try { Gdk.Pixbuf pix = new Gdk.Pixbuf (stream); - stream.Close (); string txt = name + "\n<span foreground='darkgrey' size='x-small'>" + pix.Width + " x " + pix.Height + "</span>"; pix = GetThumbnail (pix); resourceListStore.AppendValues (pix, txt, name); resources [name] = pix; } catch { // Doesn't look like a valid image. Just ignore it. + } finally { + stream.Dispose (); } } |