diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-02-14 01:13:01 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2020-02-18 11:21:47 -0800 |
commit | b0f6455feac97e41045ee394e11c24d92c370f6e (patch) | |
tree | b9c63bfee5074ad1b904e9e81ec64376f0e7f911 /hw/display/artist.c | |
parent | 0814343ce294b4dff780f6e8b6baa1acb1dc7ef8 (diff) |
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>
Diffstat (limited to 'hw/display/artist.c')
-rw-r--r-- | hw/display/artist.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/display/artist.c b/hw/display/artist.c index 97c811b35e..5492079116 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -579,6 +579,9 @@ static void draw_line(ARTISTState *s, int x1, int y1, int x2, int y2, } else { dy = y1 - y2; } + if (!dx || !dy) { + return; + } c1 = false; if (dy > dx) { |