Skip to content

Commit 7c1454e

Browse files
committed
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 4e1d1ff. See issue #2670.
1 parent d7074bb commit 7c1454e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sql/sqlitetypes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ void Table::removeConstraints(const StringVector& vStrFields, Constraint::Constr
505505
for(auto it = m_constraints.begin();it!=m_constraints.end();)
506506
{
507507
if((*it)->columnList() == vStrFields && (*it)->type() == type)
508-
m_constraints.erase(it++);
508+
it = m_constraints.erase(it);
509509
else
510510
++it;
511511
}

0 commit comments

Comments
 (0)