Fix crash when reloading plugins and triggering subscribed events.

This commit is contained in:
Martín Lucas Golini
2024-08-15 00:29:15 -03:00
parent 01b393e848
commit fe69610cb7
2 changed files with 4 additions and 1 deletions

View File

@@ -59,7 +59,8 @@ FormatterPlugin::~FormatterPlugin() {
if ( editor.first->hasDocument() )
editor.first->getDocument().removeCommand( kb.first );
}
for ( auto listener : editor.second )
editor.first->removeEventListener( listener );
editor.first->unregisterPlugin( this );
}
}