mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
don't ref dicts from dmgr_get()
This commit is contained in:
parent
a4302897e2
commit
dee75f5a0a
1 changed files with 3 additions and 2 deletions
|
@ -613,6 +613,7 @@ makeDict( MPFORMAL JNIEnv *env, DictMgrCtxt* dictMgr, JNIUtilCtxt* jniutil, jstr
|
|||
off_t bytesSize = 0;
|
||||
|
||||
const char* name = (*env)->GetStringUTFChars( env, jname, NULL );
|
||||
/* remember: dmgr_get calls dict_ref() */
|
||||
AndDictionaryCtxt* anddict = (AndDictionaryCtxt*)dmgr_get( dictMgr, name );
|
||||
|
||||
if ( NULL == anddict ) {
|
||||
|
@ -665,12 +666,12 @@ makeDict( MPFORMAL JNIEnv *env, DictMgrCtxt* dictMgr, JNIUtilCtxt* jniutil, jstr
|
|||
}
|
||||
}
|
||||
dmgr_put( dictMgr, name, &anddict->super );
|
||||
dict_ref( &anddict->super );
|
||||
}
|
||||
|
||||
(*env)->ReleaseStringUTFChars( env, jname, name );
|
||||
|
||||
DictionaryCtxt* result = dict_ref( (DictionaryCtxt*)anddict ); /* NULL ok */
|
||||
return result;
|
||||
return &anddict->super;
|
||||
} /* makeDict */
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
Loading…
Add table
Reference in a new issue