summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorShixin Zeng <zeng.shixin@gmail.com>2009-08-20 23:53:57 +0300
committerTor Lillqvist <tml@iki.fi>2009-08-20 23:53:57 +0300
commit89a8fade6f75d3a8f19ffa4c9229894081300cb0 (patch)
tree69124e7758d0027a6880a4d32ed3fb30e740fbe5 /gdk-pixbuf
parente10db38f0d82f997850cc890d79140751c6962b3 (diff)
downloadgdk-pixbuf-89a8fade6f75d3a8f19ffa4c9229894081300cb0.tar.gz
Don't use stream before it is created
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/io-gdip-utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdk-pixbuf/io-gdip-utils.c b/gdk-pixbuf/io-gdip-utils.c
index 935372516..3dba9e5a7 100644
--- a/gdk-pixbuf/io-gdip-utils.c
+++ b/gdk-pixbuf/io-gdip-utils.c
@@ -353,7 +353,6 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
if (!hg)
return NULL;
- IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
hr = CreateStreamOnHGlobal (hg, FALSE, (LPSTREAM *)&stream);
if (!SUCCEEDED (hr)) {
@@ -361,7 +360,9 @@ gdip_buffer_to_bitmap (const gchar *buffer, size_t size, GError **error)
GlobalFree (hg);
return NULL;
}
-
+
+ IStream_SetSize (stream, *(ULARGE_INTEGER *)&size64);
+
status = GdipCreateBitmapFromStream (stream, &bitmap);
if (Ok != status)