diff options
Diffstat (limited to 'app/gfx')
-rwxr-xr-x | app/gfx/canvas_linux.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/gfx/canvas_linux.cc b/app/gfx/canvas_linux.cc index 2b427a8..a0f7e0d 100755 --- a/app/gfx/canvas_linux.cc +++ b/app/gfx/canvas_linux.cc @@ -206,6 +206,9 @@ void Canvas::DrawStringInt(const std::wstring& text, const SkColor& color, int x, int y, int w, int h, int flags) { + if (w <= 0 || h <= 0) + return; + cairo_t* cr = beginPlatformPaint(); PangoLayout* layout = pango_cairo_create_layout(cr); |