chigraph / chigraph-gui

The desktop interface for chigraph
https://chigraph.github.io
Apache License 2.0
121 stars 32 forks source link

Closing tabs in debug mode #21

Open hojjatjafary opened 4 years ago

hojjatjafary commented 4 years ago

Hi, Seems closing tabs causes runtime assertion of an invalid iterator here :

https://github.com/chigraph/chigraph-gui/blob/f66c57369a067a66d99e60ed6ddf82a9540a13b2/src/centraltabview.cpp#L246

The item is erased from std::map so the iterator will be invalid but you are trying to compare the iterator with the end of map, it is better to put the assertion before erasing the items.