check args.length before indexing
This commit is contained in:
parent
77d014b24c
commit
a8ab98e6cb
|
@ -151,7 +151,9 @@ public class Ps extends SigarCommandBase {
|
|||
else {
|
||||
try {
|
||||
String[] args = sigar.getProcArgs(pid);
|
||||
if (args.length != 0) {
|
||||
name = args[0];
|
||||
}
|
||||
} catch (SigarException e) {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue