From 5e71e38f906d4843e449bdb1724b2d745c706b85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=A5=E5=88=A9=E5=A5=A5=E5=97=B7=E5=97=B7=E5=8F=AB?= Date: Thu, 12 Jan 2023 00:55:49 +0800 Subject: [PATCH] fix process not args output nil error bug --- src/perfmonUtil/process.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/perfmonUtil/process.go b/src/perfmonUtil/process.go index bdc88fb..d647d2e 100644 --- a/src/perfmonUtil/process.go +++ b/src/perfmonUtil/process.go @@ -386,9 +386,11 @@ func GetProcessInfo(client *adb.Device, pid string, packageName string, perfOpti processInfo.FPS = &fps } + if processInfo != nil { + processInfo.Name = status.Name + processInfo.Pid = status.Pid + } - processInfo.Name = status.Name - processInfo.Pid = status.Pid return }