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:
@@ -39,6 +39,10 @@ status_t
|
|||||||
vga_planar_blit(vesa_shared_info *info, uint8 *src, int32 srcBPR,
|
vga_planar_blit(vesa_shared_info *info, uint8 *src, int32 srcBPR,
|
||||||
int32 left, int32 top, int32 right, int32 bottom)
|
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;
|
int32 dstBPR = info->bytes_per_row;
|
||||||
uint8 *dst = info->frame_buffer + top * dstBPR + left / 8;
|
uint8 *dst = info->frame_buffer + top * dstBPR + left / 8;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user