mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-18 19:48:23 -05:00
Fix possible crash when removing constraints from table definition
This fixes a possible crash when trying to remove a table constraint
from a table definition. The issue was introduced in commit
4e1d1ff49f.
See issue #2670.
This commit is contained in:
@@ -505,7 +505,7 @@ void Table::removeConstraints(const StringVector& vStrFields, Constraint::Constr
|
||||
for(auto it = m_constraints.begin();it!=m_constraints.end();)
|
||||
{
|
||||
if((*it)->columnList() == vStrFields && (*it)->type() == type)
|
||||
m_constraints.erase(it++);
|
||||
it = m_constraints.erase(it);
|
||||
else
|
||||
++it;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user