Commit 6d23f3e7 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Keep the source DC locked until the end in StretchBlt and AlphaBlend.

parent 61f4767a
......@@ -256,9 +256,11 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
if (!(dc_src = get_dc_ptr( src_dev->hdc ))) return FALSE;
src_dev = GET_DC_PHYSDEV( dc_src, pGetImage );
err = src_dev->funcs->pGetImage( src_dev, src_info, &bits, src );
if (src_dev->funcs->pGetImage( src_dev, src_info, &bits, src ))
{
release_dc_ptr( dc_src );
if (err) return FALSE;
return FALSE;
}
dst_dev = GET_DC_PHYSDEV( dc_dst, pPutImage );
copy_bitmapinfo( dst_info, src_info );
......@@ -299,6 +301,7 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
}
if (bits.free) bits.free( &bits );
release_dc_ptr( dc_src );
return !err;
}
......@@ -317,7 +320,6 @@ BOOL nulldrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
if (!(dc_src = get_dc_ptr( src_dev->hdc ))) return FALSE;
src_dev = GET_DC_PHYSDEV( dc_src, pGetImage );
err = src_dev->funcs->pGetImage( src_dev, src_info, &bits, src );
release_dc_ptr( dc_src );
if (err) goto done;
dst_dev = GET_DC_PHYSDEV( dc_dst, pBlendImage );
......@@ -339,6 +341,7 @@ BOOL nulldrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
if (bits.free) bits.free( &bits );
done:
release_dc_ptr( dc_src );
if (err) SetLastError( err );
return !err;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment