Merge pull request #3949 from akallabeth/gdi_surface_crash_fix

Check arguments for Bitmap_SetSurface
This commit is contained in:
Martin Fleisz 2017-05-11 13:59:00 +02:00 committed by GitHub
commit 1e3d4d62a4

View File

@ -183,7 +183,14 @@ static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
static BOOL gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap,
BOOL primary)
{
rdpGdi* gdi = context->gdi;
rdpGdi* gdi;
if (!context)
return FALSE;
gdi = context->gdi;
if (!gdi)
return FALSE;
if (primary)
gdi->drawing = gdi->primary;