diff options
| author | Brian Munro <brian.alexander.munro@gmail.com> | 2017-11-01 06:38:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 06:38:14 +0200 |
| commit | 080cfeea410de21b4b2c7edcbc7169dd9c2d1744 (patch) | |
| tree | d5e200dd60e19f8baf645bf02b6aaa119fdfe37b | |
| parent | ef699514c9dbef148639e91a7ca37ba0e6430162 (diff) | |
| parent | 0825cd0f203af00a074203dde469bf40102e821d (diff) | |
Merge pull request #117 from Al12rs/QT5.7
Added !found condition to for loop to avoid possible leak.
| -rw-r--r-- | src/organizercore.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 48e2f98a..05da9f83 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1264,7 +1264,7 @@ bool OrganizerCore::waitForProcessCompletion(HANDLE handle, LPDWORD exitCode) size_t count =
std::min<size_t>(static_cast<size_t>(maxCount), numProcesses);
if (count > 0) {
- for (size_t i = 0; i < count; ++i) {
+ for (size_t i = 0; i < count && !found; ++i) {
std::wstring processName = getProcessName(processes[i]);
if (!boost::starts_with(processName, L"ModOrganizer.exe")) {
if (!boost::starts_with(processName, L"unknown")) {
|
