From 055682cdb519ec8d3440c088a8da4301b60f9e56 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Wed, 3 Jun 2015 17:12:46 -0400 Subject: [PATCH] use length of sizes array --- core/src/processing/opengl/PSurfaceJOGL.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/processing/opengl/PSurfaceJOGL.java b/core/src/processing/opengl/PSurfaceJOGL.java index 577c0649e..6d1f764ad 100644 --- a/core/src/processing/opengl/PSurfaceJOGL.java +++ b/core/src/processing/opengl/PSurfaceJOGL.java @@ -462,8 +462,8 @@ public class PSurfaceJOGL implements PSurface { protected void setIconImages() { int[] sizes = { 16, 32, 48, 64 }; - String[] iconImages = new String[4]; - for (int i = 0; i < 4; i++) { + String[] iconImages = new String[sizes.length]; + for (int i = 0; i < sizes.length; i++) { iconImages[i] = "/icon/icon-" + sizes[i] + ".png"; } NewtFactory.setWindowIcons(new ClassResources(PApplet.class, iconImages));