From 7fa70375e1a00c1ada1cbf782bc52b812349a0d0 Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Tue, 4 Oct 2016 01:41:40 -0300 Subject: [PATCH] gui2/canvas: Fix zero-width rectangles being painted 1 px-wide This fixes the selection highlight for textboxes glitching into view as a 1 px-wide highlight on the left end when there isn't an active selection. --- src/gui/core/canvas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/core/canvas.cpp b/src/gui/core/canvas.cpp index 6251cb8be244..67db79ecba11 100644 --- a/src/gui/core/canvas.cpp +++ b/src/gui/core/canvas.cpp @@ -738,7 +738,7 @@ void trectangle::draw(surface& canvas, } // Fill the background, if applicable - if(fill_color_) { + if(fill_color_ && w && h) { set_renderer_color(renderer, fill_color_); SDL_Rect area {