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);
}