Fix #4291: xfreerdp segfault when connecting freerdp-shadow-cli

This commit is contained in:
daixj 2017-11-29 05:12:40 -05:00
parent 2f15b806f5
commit d10448fde2

View File

@ -1149,11 +1149,11 @@ static BOOL gdi_init_primary(rdpGdi* gdi, UINT32 stride, UINT32 format,
buffer, pfree);
}
gdi->stride = gdi->primary->bitmap->scanline;
if (!gdi->primary->bitmap)
goto fail_bitmap;
gdi->stride = gdi->primary->bitmap->scanline;
gdi_SelectObject(gdi->primary->hdc, (HGDIOBJECT) gdi->primary->bitmap);
gdi->primary->org_bitmap = NULL;
gdi->primary_buffer = gdi->primary->bitmap->data;