gdiplus: Reset the lock count when unlocking a bitmap in write mode.

This commit is contained in:
Vincent Povirk 2010-01-01 14:55:54 -06:00 committed by Alexandre Julliard
parent 495c42b617
commit 7afd9603b5
1 changed files with 2 additions and 0 deletions

View File

@ -578,6 +578,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
{ {
/* we passed a direct reference; no need to do anything */ /* we passed a direct reference; no need to do anything */
bitmap->lockmode = 0; bitmap->lockmode = 0;
bitmap->numlocks = 0;
return Ok; return Ok;
} }
@ -608,6 +609,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap,
GdipFree(bitmap->bitmapbits); GdipFree(bitmap->bitmapbits);
bitmap->bitmapbits = NULL; bitmap->bitmapbits = NULL;
bitmap->lockmode = 0; bitmap->lockmode = 0;
bitmap->numlocks = 0;
return Ok; return Ok;
} }