mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
Fixed another possible hunspell memory leak
This commit is contained in:
parent
17f400be35
commit
decf8dacd5
@ -255,6 +255,8 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
if (fileMatches.Length > 0)
|
||||
dictionary = fileMatches[0].Substring(0, fileMatches[0].Length - 4);
|
||||
}
|
||||
if (_hunspell != null)
|
||||
_hunspell.Dispose();
|
||||
_hunspell = Hunspell.GetHunspell(dictionary);
|
||||
IsDictionaryLoaded = true;
|
||||
_spellCheckDictionaryName = dictionary;
|
||||
@ -264,7 +266,6 @@ namespace Nikse.SubtitleEdit.Logic.Ocr
|
||||
{
|
||||
IsDictionaryLoaded = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string SpellCheckDictionaryName
|
||||
|
Loading…
Reference in New Issue
Block a user