Skip to content

Commit 896fe7f

Browse files
committed
Moved check into method.
1 parent 43f9310 commit 896fe7f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

NativeCore/Windows/CloseRemoteProcess.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44

55
void RC_CallConv CloseRemoteProcess(RC_Pointer handle)
66
{
7+
if (handle == nullptr)
8+
{
9+
return;
10+
}
11+
712
CloseHandle(handle);
813
}

NativeCore/Windows/EnumerateProcesses.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ void RC_CallConv EnumerateProcesses(EnumerateProcessCallback callbackProcess)
8181

8282
}
8383

84-
if (process && process != INVALID_HANDLE_VALUE)
85-
{
86-
CloseRemoteProcess(process);
87-
}
84+
CloseRemoteProcess(process);
8885

8986
} while (Process32NextW(handle, &pe32));
9087
}

0 commit comments

Comments
 (0)