gdip-pixbuf-loader r8 - in trunk: . src
- From: doml svn gnome org
- To: svn-commits-list gnome org
- Subject: gdip-pixbuf-loader r8 - in trunk: . src
- Date: Mon, 18 Feb 2008 16:55:17 +0000 (GMT)
Author: doml
Date: Mon Feb 18 16:55:17 2008
New Revision: 8
URL: http://svn.gnome.org/viewvc/gdip-pixbuf-loader?rev=8&view=rev
Log:
2008-02-18 Dominic Lachowicz <domlachowicz gmail com>
* src/io-gdip-utils.c (io_gdip_buffer_to_bitmap): Release the IStream
Modified:
trunk/ChangeLog
trunk/src/io-gdip-utils.c
Modified: trunk/src/io-gdip-utils.c
==============================================================================
--- trunk/src/io-gdip-utils.c (original)
+++ trunk/src/io-gdip-utils.c Mon Feb 18 16:55:17 2008
@@ -157,6 +157,10 @@
return hg;
}
+#ifndef IStream_Release
+#define IStream_Release(This) (This)->lpVtbl->Release(This)
+#endif
+
GpBitmap *
io_gdip_buffer_to_bitmap (const gchar * buffer, size_t size)
{
@@ -179,15 +183,14 @@
hr = GdipCreateBitmapFromStream(stream, &bitmap);
+ IStream_Release(stream);
+ GlobalFree(hg);
+
if (!SUCCEEDED(hr))
{
- GlobalFree(hg);
return NULL;
}
- GlobalFree(hg);
-
- //Destroy Stream??
return bitmap;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]