diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index d788e733..8732a5d4 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -613,7 +613,10 @@ public final class Application implements IPathElement, Runnable { * to use for the object, then looking up the skin for the prototype. */ public Skin getSkin (Object object, String skinname, Object[] skinpath) { - return skinmgr.getSkin (object, skinname, skinpath); + Prototype proto = getPrototype (object); + if (proto == null) + return null; + return skinmgr.getSkin (proto, skinname, skinpath); } /** diff --git a/src/helma/framework/core/SkinManager.java b/src/helma/framework/core/SkinManager.java index 1d0ac449..d638604b 100644 --- a/src/helma/framework/core/SkinManager.java +++ b/src/helma/framework/core/SkinManager.java @@ -3,8 +3,7 @@ package helma.framework.core; -import java.util.Map; -import java.util.Iterator; +import java.util.*; import helma.objectmodel.INode; import java.io.*; @@ -22,14 +21,8 @@ public final class SkinManager { this.app = app; } - public Skin getSkin (Object object, String skinname, Object[] skinpath) { - Prototype proto = app.getPrototype (object); - Skin skin = getSkin (proto, skinname, "skin", skinpath); - return skin; - } - - protected Skin getSkin (Prototype proto, String skinname, String extension, Object[] skinpath) { + protected Skin getSkin (Prototype proto, String skinname, Object[] skinpath) { if (proto == null) return null; Skin skin = null; @@ -38,7 +31,7 @@ public final class SkinManager { do { if (skinpath != null) { for (int i=0; i