mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
don't crash in networked games
This commit is contained in:
parent
fec1ce3bed
commit
6203a23c62
1 changed files with 6 additions and 3 deletions
|
@ -63,8 +63,10 @@ DictionaryCtxt*
|
|||
linux_dictionary_make( MPFORMAL const LaunchParams* params,
|
||||
const char* dictFileName, XP_Bool useMMap )
|
||||
{
|
||||
LinuxDictionaryCtxt* result =
|
||||
(LinuxDictionaryCtxt*)dmgr_get( params->dictMgr, dictFileName );
|
||||
LinuxDictionaryCtxt* result = NULL;
|
||||
if ( !!dictFileName ) {
|
||||
result = (LinuxDictionaryCtxt*)dmgr_get( params->dictMgr, dictFileName );
|
||||
}
|
||||
if ( !result ) {
|
||||
result = (LinuxDictionaryCtxt*)XP_CALLOC(mpool, sizeof(*result));
|
||||
|
||||
|
@ -84,8 +86,9 @@ linux_dictionary_make( MPFORMAL const LaunchParams* params,
|
|||
XP_FREE( mpool, result );
|
||||
result = NULL;
|
||||
}
|
||||
|
||||
dmgr_put( params->dictMgr, dictFileName, &result->super );
|
||||
}
|
||||
dmgr_put( params->dictMgr, dictFileName, &result->super );
|
||||
}
|
||||
|
||||
return dict_ref( &result->super );
|
||||
|
|
Loading…
Reference in a new issue