prevent possible NPE in getServiceConfigs(FileFilter)

This commit is contained in:
Doug MacEachern 2008-02-01 04:25:56 +00:00
parent 7e422addb4
commit d2800cad0f
1 changed files with 5 additions and 2 deletions

View File

@ -133,8 +133,11 @@ public class Service extends Win32 {
try {
service = new Service((String)names.get(i));
ServiceConfig config = service.getConfig();
String path = config.getExe().trim();
if (!filter.accept(new File(path))) {
String path = config.getExe();
if (path == null) {
continue;
}
if (!filter.accept(new File(path.trim()))) {
continue;
}
services.add(config);