mirror of
https://git.checksum.fail/alec/erythros
synced 2025-12-11 13:39:55 +02:00
System/Libraries/Graphics2D: NULL check for HLine2D
This commit is contained in:
@@ -726,7 +726,7 @@ U0 VLine2D(Context2D* ctx, I64 x, I64 y, I64 y2,
|
|||||||
U0 HLine2D(Context2D* ctx, I64 x, I64 y, I64 x2,
|
U0 HLine2D(Context2D* ctx, I64 x, I64 y, I64 x2,
|
||||||
U32 color)
|
U32 color)
|
||||||
{ // Draw a horizontal line.
|
{ // Draw a horizontal line.
|
||||||
if (x > ctx->width || y > ctx->height)
|
if (!ctx || !ctx->fb || x > ctx->width || y > ctx->height)
|
||||||
return;
|
return;
|
||||||
if (x2 < x)
|
if (x2 < x)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user