Fix deletion bug in Selector::_preDestroy().
* Bug: In Selector::_preDestroy(), *do not* iterate over the _cellWidgets map as we destroy it's elements! We end up in destroyed ones... Instead destroy the first one until the map is empty.
This commit is contained in:
parent
a5d92ecc29
commit
7f936367f8
|
@ -118,7 +118,8 @@ namespace Hurricane {
|
|||
|
||||
void Selector::_preDestroy()
|
||||
{
|
||||
for ( auto iwidget : _cellWidgets ) detachFrom( iwidget.first, true );
|
||||
while ( not _cellWidgets.empty() )
|
||||
detachFrom( _cellWidgets.begin()->first, true );
|
||||
PrivateProperty::_preDestroy();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue