From b5c14da4a6c02a65503e3b53d93a53fd0378b7d8 Mon Sep 17 00:00:00 2001 From: bjorn Date: Sun, 4 Dec 2022 18:01:20 -0800 Subject: [PATCH] Pass:line errors if only 1 point is provided; --- src/modules/graphics/graphics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/graphics/graphics.c b/src/modules/graphics/graphics.c index 10a9b872..64dc6bb1 100644 --- a/src/modules/graphics/graphics.c +++ b/src/modules/graphics/graphics.c @@ -4338,6 +4338,8 @@ void lovrPassPoints(Pass* pass, uint32_t count, float** points) { } void lovrPassLine(Pass* pass, uint32_t count, float** points) { + lovrCheck(count >= 2, "Need at least 2 points to make a line"); + uint16_t* indices; lovrPassDraw(pass, &(Draw) {