From 08944f3a004ee63ebe4524ffc0c5d3dd77ebedbe Mon Sep 17 00:00:00 2001 From: codeanticode Date: Fri, 25 May 2012 16:32:07 +0000 Subject: [PATCH] creates top and bottom vectors if null --- core/src/processing/core/PShape.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/processing/core/PShape.java b/core/src/processing/core/PShape.java index ef78d67c2..ffd4926e4 100644 --- a/core/src/processing/core/PShape.java +++ b/core/src/processing/core/PShape.java @@ -405,6 +405,9 @@ public class PShape implements PConstants { public PVector getTop(PVector top) { + if (top == null) { + top = new PVector(); + } return top; } @@ -415,6 +418,9 @@ public class PShape implements PConstants { public PVector getBottom(PVector bottom) { + if (bottom == null) { + bottom = new PVector(); + } return bottom; }