瀏覽代碼

Optimization when no ancestor process is identified

(cherry picked from commit aa3deb17bed728db8f2833ebf94eef8535f6834c)

Source commit: 94ac2d29cc95b64e4b9d19e143ff402336781934
Martin Prikryl 4 年之前
父節點
當前提交
ea577264ab
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      source/core/Common.cpp

+ 4 - 0
source/core/Common.cpp

@@ -4200,6 +4200,10 @@ UnicodeString __fastcall GetAncestorProcessName(int Levels)
       {
         Result = GetProcessName(ProcessId);
       }
+      else if (Result.IsEmpty())
+      {
+        Result = L"n/a";
+      }
 
       CloseHandle(Snapshot);
     }