提交 5386c0bf 编写于 作者: K kohsuke

NPE fix

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18414 71c3de6d-444a-0410-be80-ed276b4c234a
上级 2f199d2b
......@@ -1725,7 +1725,7 @@ public final class Hudson extends Node implements ItemGroup<TopLevelItem>, Stapl
*/
public TopLevelItem getItem(String name) {
TopLevelItem item = items.get(name);
if (!item.hasPermission(Item.READ))
if (item==null || !item.hasPermission(Item.READ))
return null;
return item;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册