This repository was archived by the owner on Dec 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ std::wstring ToWString(const std::string& string) {
5555}
5656
5757WindowsSpellchecker::WindowsSpellchecker () {
58+ this ->spellcheckerFactory = NULL ;
5859 this ->currentSpellchecker = NULL ;
5960
6061 if (InterlockedIncrement (&g_COMRefcount) == 1 ) {
@@ -73,8 +74,14 @@ WindowsSpellchecker::WindowsSpellchecker() {
7374}
7475
7576WindowsSpellchecker::~WindowsSpellchecker () {
77+ if (this ->currentSpellchecker ) {
78+ this ->currentSpellchecker ->Release ();
79+ this ->currentSpellchecker = NULL ;
80+ }
81+
7682 if (this ->spellcheckerFactory ) {
7783 this ->spellcheckerFactory ->Release ();
84+ this ->spellcheckerFactory = NULL ;
7885 }
7986
8087 if (InterlockedDecrement (&g_COMRefcount) == 0 ) {
@@ -83,7 +90,7 @@ WindowsSpellchecker::~WindowsSpellchecker() {
8390}
8491
8592bool WindowsSpellchecker::IsSupported () {
86- return !(g_COMFailed || (spellcheckerFactory == NULL ));
93+ return !(g_COMFailed || (this -> spellcheckerFactory == NULL ));
8794}
8895
8996bool WindowsSpellchecker::SetDictionary (const std::string& language, const std::string& path) {
You can’t perform that action at this time.
0 commit comments