Fix showing incorrect status for environment tab when the process has exited
@@ -171,6 +171,13 @@ VOID PhpSetEnvironmentListStatusMessage(
_Inout_ PPH_ENVIRONMENT_CONTEXT Context,
_In_ ULONG Status
)
+{
+ if (Context->ProcessItem->State & PH_PROCESS_ITEM_REMOVED)
+ {
+ PhMoveReference(&Context->StatusMessage, PhCreateString(L"There are no environment variables to display."));
+ TreeNew_SetEmptyText(Context->TreeNewHandle, &Context->StatusMessage->sr, 0);
+ }
+ else
{
PPH_STRING statusMessage;
@@ -183,6 +190,7 @@ VOID PhpSetEnvironmentListStatusMessage(
//TreeNew_NodesStructured(Context->TreeNewHandle);
PhClearReference(&statusMessage);
}
+}
VOID PhpRefreshEnvironmentList(
_Inout_ PPH_ENVIRONMENT_CONTEXT Context,
