Fixed a crash when removing zones using the Global Deletion dialog

Fixes: lp:1635266
* https://bugs.launchpad.net/kicad/+bug/1635266
This commit is contained in:
Maciej Suminski
2016-10-20 17:15:50 +02:00
parent ce83410c52
commit 74b5858665
2 changed files with 21 additions and 30 deletions
+3 -1
View File
@@ -43,7 +43,8 @@ COMMIT::~COMMIT()
COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType )
{
assert( aChangeType != ( CHT_MODIFY | CHT_DONE ) ); // CHT_MODIFY and CHT_DONE are not compatible
// CHT_MODIFY and CHT_DONE are not compatible
assert( ( aChangeType & ( CHT_MODIFY | CHT_DONE ) ) != ( CHT_MODIFY | CHT_DONE ) );
int flag = aChangeType & CHT_FLAGS;
@@ -55,6 +56,7 @@ COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType )
return *this;
case CHT_REMOVE:
assert( m_changedItems.find( aItem ) == m_changedItems.end() );
makeEntry( aItem, CHT_REMOVE | flag );
return *this;