Browse Source

Optimization when no ancestor process is identified

(cherry picked from commit aa3deb17bed728db8f2833ebf94eef8535f6834c)

Source commit: 94ac2d29cc95b64e4b9d19e143ff402336781934
Martin Prikryl 4 years ago
parent
commit
ea577264ab
1 changed files with 4 additions and 0 deletions
  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);
         Result = GetProcessName(ProcessId);
       }
       }
+      else if (Result.IsEmpty())
+      {
+        Result = L"n/a";
+      }
 
 
       CloseHandle(Snapshot);
       CloseHandle(Snapshot);
     }
     }