drivers/vesa: Don't dereference frame_buffer when NULL

* Solves the KDL side of #14905
* We do it quietly since we don't want a log event every blit

Change-Id: I8e9b55fab78bd1742a4282dd0812823f33dd9f32
This commit is contained in:
Alexander von Gluck IV 2019-02-15 15:26:44 -06:00
parent 50428c35ad
commit 122efe3a12

View File

@ -39,6 +39,10 @@ status_t
vga_planar_blit(vesa_shared_info *info, uint8 *src, int32 srcBPR,
int32 left, int32 top, int32 right, int32 bottom)
{
// If we don't actually have a frame_buffer, bail.
if (info->frame_buffer == NULL)
return B_BAD_ADDRESS;
int32 dstBPR = info->bytes_per_row;
uint8 *dst = info->frame_buffer + top * dstBPR + left / 8;