gdiplus: Reset the lock count when unlocking a bitmap in write mode.
This commit is contained in:
parent
495c42b617
commit
7afd9603b5
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue