diff --git a/src/libs/utils/environment.cpp b/src/libs/utils/environment.cpp index 298987ee557..9ff5b4be87d 100644 --- a/src/libs/utils/environment.cpp +++ b/src/libs/utils/environment.cpp @@ -376,7 +376,7 @@ QList Environment::diff(const Environment &other) const if (thisIt == constEnd()) { result.append(EnvironmentItem(otherIt.key(), otherIt.value())); ++otherIt; - } else if (otherIt == constEnd()) { + } else if (otherIt == other.constEnd()) { EnvironmentItem item(thisIt.key(), QString()); item.unset = true; result.append(item);