Remove “grammar changed” callback

This would cause a crash if grammar changed on disk for a document which was closed but not disposed.
This commit is contained in:
Allan Odgaard
2013-02-18 15:34:30 +01:00
parent 63beedc6f4
commit c26a61a749

View File

@@ -874,6 +874,10 @@ namespace document
_backup_path = NULL_STR;
check_modified(-1, -1);
if(_grammar)
_grammar->remove_callback(&_grammar_callback);
_grammar.reset();
_undo_manager.reset();
_buffer.reset();
_pristine_buffer = NULL_STR;