fixing NPE. getUrlName() contract allows returning null.

This commit is contained in:
Kohsuke Kawaguchi committed 2011-12-02 15:36:37 -08:00
1 parent 87f501ce53
commit df259d7a89
1 file changed
+4 -1
+4 -1
View File
@@ -454,9 +454,12 @@ public abstract class View extends AbstractModelObject implements AccessControll
}
public Object getDynamic(String token) {
for (Action a : getActions())
for (Action a : getActions()) {
String url = a.getUrlName();
if (url==null) continue;
if(a.getUrlName().equals(token))
return a;
}
return null;
}