mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-17 23:04:06 +00:00
Fix some crashes
This commit is contained in:
parent
361a9ceb97
commit
df94e2ee80
1
bgl.cc
1
bgl.cc
|
@ -417,6 +417,7 @@ namespace
|
|||
dictionaryDescription = "NONE";
|
||||
else
|
||||
{
|
||||
Mutex::Lock _( idxMutex );
|
||||
vector< char > chunk;
|
||||
char * dictDescription = chunks.getBlock( idxHeader.descriptionAddress, chunk );
|
||||
string str( dictDescription );
|
||||
|
|
|
@ -491,7 +491,11 @@ void DictdDictionary::getArticleText( uint32_t articleAddress, QString & headwor
|
|||
|
||||
string articleText;
|
||||
|
||||
char * articleBody = dict_data_read_( dz, articleOffset, articleSize, 0, 0 );
|
||||
char * articleBody;
|
||||
{
|
||||
Mutex::Lock _( dzMutex );
|
||||
articleBody = dict_data_read_( dz, articleOffset, articleSize, 0, 0 );
|
||||
}
|
||||
|
||||
if ( !articleBody )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue