diff options
author | Philippe Mathieu-Daudé | 2020-02-14 01:13:01 +0100 |
---|---|---|
committer | Richard Henderson | 2020-02-18 20:21:47 +0100 |
commit | b0f6455feac97e41045ee394e11c24d92c370f6e (patch) | |
tree | b9c63bfee5074ad1b904e9e81ec64376f0e7f911 /hw/display/artist.c | |
parent | hw/display/artist: Delay some variables initialization (diff) | |
download | qemu-b0f6455feac97e41045ee394e11c24d92c370f6e.tar.gz qemu-b0f6455feac97e41045ee394e11c24d92c370f6e.tar.xz qemu-b0f6455feac97e41045ee394e11c24d92c370f6e.zip |
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) { |