From 86e0677f48a309314b45ba5f06c1c62d14b2200d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Va=CC=81clav=20Slavi=CC=81k?= Date: Thu, 1 Jun 2017 19:19:44 +0200 Subject: [PATCH] Fix DrawRoundedRectangle assert with wxGTK 3.0 Don't draw if w=0. Fixes #396. --- src/editing_area.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/editing_area.cpp b/src/editing_area.cpp index e70cce66c..336a4db54 100644 --- a/src/editing_area.cpp +++ b/src/editing_area.cpp @@ -251,7 +251,8 @@ private: gc->SetPen(*wxTRANSPARENT_PEN); auto rect = GetClientRect(); - gc->DrawRoundedRectangle(rect.x, rect.y, rect.width, rect.height, PX(2)); + if (!rect.IsEmpty()) + gc->DrawRectangle(rect.x, rect.y, rect.width, rect.height); } wxColour m_fg, m_bg; -- 2.13.0