"Nathan Beckmann" <[EMAIL PROTECTED]> wrote: > stat = GdipCreateBitmapFromStream(stream, bitmap); > > - if(!stat) > + if(stream) > IStream_Release(stream);
The 'if' check above is not needed, GdipCreateStreamOnFile returns a status which is already checked. > + stat = GdipCreateStreamOnFile(filename, GENERIC_READ, &stream); > + > + if (stat != Ok) > + return stat; > + > + stat = GdipLoadImageFromStream(stream, image); > + > + if (stream) > + IStream_Release(stream); Same thing here. -- Dmitry.
