hw/display/artist: Avoid drawing line when nothing to display

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200214001303.12873-5-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Philippe Mathieu-Daudé 2020-02-14 01:13:01 +01:00 committed by Richard Henderson
parent 0814343ce2
commit b0f6455fea
1 changed files with 3 additions and 0 deletions

View File

@ -579,6 +579,9 @@ static void draw_line(ARTISTState *s, int x1, int y1, int x2, int y2,
} else { } else {
dy = y1 - y2; dy = y1 - y2;
} }
if (!dx || !dy) {
return;
}
c1 = false; c1 = false;
if (dy > dx) { if (dy > dx) {