From aab16328690218f1a7d3daf6ba352d2536b007be Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Mon, 23 Aug 2021 11:14:04 +0200 Subject: [PATCH] [DEV] update classpath --- .classpath | 12 +----------- src/org/atriasoft/esvg/render/Weight.java | 8 ++++++++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.classpath b/.classpath index 94d751c..46ec0e4 100644 --- a/.classpath +++ b/.classpath @@ -18,12 +18,7 @@ - - - - - - + @@ -38,10 +33,5 @@ - - - - - diff --git a/src/org/atriasoft/esvg/render/Weight.java b/src/org/atriasoft/esvg/render/Weight.java index e03b1fe..9ddefca 100644 --- a/src/org/atriasoft/esvg/render/Weight.java +++ b/src/org/atriasoft/esvg/render/Weight.java @@ -183,6 +183,14 @@ public class Weight { // ----------------------------------------------- public void resize(final Vector2i size) { this.size = size; + if (this.size.x() <= 0) { + Log.error("Error in the Weight size : " + this.size); + this.size = this.size.withX(1); + } + if (this.size.y() <= 0) { + Log.error("Error in the Weight size : " + this.size); + this.size = this.size.withY(1); + } this.data = new float[this.size.y()][this.size.x()]; clear(0); }