From 4a63f44f443d260413e20f627eefe3ee5753dcc9 Mon Sep 17 00:00:00 2001 From: wj32 Date: Wed, 27 Apr 2011 06:17:20 +0000 Subject: [PATCH] use fallback value in case PhLocalSystemName = NULL git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4178 21ef857c-d57f-4fe0-8362-d861dc6d29cd --- 2.x/trunk/ProcessHacker/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/2.x/trunk/ProcessHacker/main.c b/2.x/trunk/ProcessHacker/main.c index df9aeabb8..7d99d7fcc 100644 --- a/2.x/trunk/ProcessHacker/main.c +++ b/2.x/trunk/ProcessHacker/main.c @@ -92,6 +92,10 @@ INT WINAPI WinMain( PhLocalSystemName = PhGetSidFullName(&PhSeLocalSystemSid, TRUE, NULL); + // There has been a report of the above call failing. + if (!PhLocalSystemName) + PhLocalSystemName = PhCreateString(L"NT AUTHORITY\\SYSTEM"); + PhApplicationFileName = PhGetApplicationFileName(); PhApplicationDirectory = PhGetApplicationDirectory();