Fix a possible endless loop on some platforms

See issue #1531.
This commit is contained in:
Martin Kleusberg
2018-09-27 11:58:00 +02:00
parent 7fb570d668
commit f9ac3aa711

View File

@@ -545,6 +545,10 @@ void Table::removeKeyFromAllConstraints(const QString& key)
void Table::renameKeyInAllConstraints(const QString& key, const QString& to)
{
// Do nothing if the key hasn't really changed
if(key == to)
return;
// Find all occurrences of the key and change it to the new one
for(auto it=m_constraints.begin();it!=m_constraints.end();)
{