Commit 918c2700 authored by Tobias Hunger's avatar Tobias Hunger

Fix importing of .user files

Task-number: QTCREATORBUG-7654
Change-Id: Ie22930861f843acb9e765423d72b23445cbe48e4
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 7d6de2e1
......@@ -356,9 +356,7 @@ bool Project::fromMap(const QVariantMap &map)
if (!ok || maxI < 0)
maxI = 0;
int active(map.value(QLatin1String(ACTIVE_TARGET_KEY), 0).toInt(&ok));
if (!ok || active < 0)
active = 0;
if (0 > active || maxI < active)
if (!ok || active < 0 || active >= maxI)
active = 0;
for (int i = 0; i < maxI; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment