fix thread command NullPointerException. #2342

This commit is contained in:
hengyunabc
2022-11-11 16:19:46 +08:00
parent 221ddd7c53
commit 2a4452f839
@@ -222,7 +222,7 @@ public class ThreadCommand extends AnnotatedCommand {
private ThreadInfo findThreadInfoById(ThreadInfo[] threadInfos, long id) {
for (int i = 0; i < threadInfos.length; i++) {
ThreadInfo threadInfo = threadInfos[i];
if ( threadInfo.getThreadId() == id) {
if (threadInfo != null && threadInfo.getThreadId() == id) {
return threadInfo;
}
}