Skip to content

Commit c1f37e8

Browse files
committed
Fix syncing events
1 parent a871399 commit c1f37e8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

RemoteInput/Plugin/NativePlugin.cxx

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ void EIOS_Inject(const char* process_name) noexcept
2020
std::vector<std::int32_t> pids = InjectProcesses(process_name);
2121
for (std::int32_t pid : pids)
2222
{
23-
ControlCenter::wait_for_sync(pid);
23+
if (pid != -1)
24+
{
25+
ControlCenter::wait_for_sync(pid);
26+
}
2427
}
2528
}
2629
}
@@ -29,7 +32,10 @@ void EIOS_Inject_PID(std::int32_t pid) noexcept
2932
{
3033
if (pid != -1)
3134
{
32-
InjectProcess(pid);
35+
if (InjectProcess(pid) == pid)
36+
{
37+
ControlCenter::wait_for_sync(pid);
38+
}
3339
}
3440
}
3541

0 commit comments

Comments
 (0)