gdiplus: Return an error for consecutive GdipLockBitmapBit calls.
This commit is contained in:
parent
eabc62db00
commit
e3f8f30a21
|
@ -114,8 +114,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
|
|||
if(flags & ImageLockModeUserInputBuf)
|
||||
return NotImplemented;
|
||||
|
||||
if((bitmap->lockmode & ImageLockModeWrite) || (bitmap->lockmode &&
|
||||
(flags & ImageLockModeWrite)))
|
||||
if(bitmap->lockmode)
|
||||
return WrongState;
|
||||
|
||||
IPicture_get_Handle(bitmap->image.picture, &hbm);
|
||||
|
|
|
@ -214,10 +214,8 @@ static void test_LockBits(void)
|
|||
/* read x2 */
|
||||
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
|
||||
expect(Ok, stat);
|
||||
todo_wine {
|
||||
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
|
||||
expect(WrongState, stat);
|
||||
}
|
||||
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
|
||||
expect(WrongState, stat);
|
||||
|
||||
stat = GdipBitmapUnlockBits(bm, &bd);
|
||||
expect(Ok, stat);
|
||||
|
|
Loading…
Reference in New Issue