Merge pull request #3949 from akallabeth/gdi_surface_crash_fix
Check arguments for Bitmap_SetSurface
This commit is contained in:
commit
1e3d4d62a4
@ -183,7 +183,14 @@ static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
|
|||||||
static BOOL gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap,
|
static BOOL gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap,
|
||||||
BOOL primary)
|
BOOL primary)
|
||||||
{
|
{
|
||||||
rdpGdi* gdi = context->gdi;
|
rdpGdi* gdi;
|
||||||
|
|
||||||
|
if (!context)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
gdi = context->gdi;
|
||||||
|
if (!gdi)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
if (primary)
|
if (primary)
|
||||||
gdi->drawing = gdi->primary;
|
gdi->drawing = gdi->primary;
|
||||||
|
Loading…
Reference in New Issue
Block a user