mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
fix: a possible bug
at rare conditions , the for loop will continue to run until the request is canceled.
This commit is contained in:
parent
e84b5aa861
commit
83f299bbc3
6
mdx.cc
6
mdx.cc
|
@ -750,8 +750,10 @@ void MddResourceRequest::run()
|
|||
return;
|
||||
}
|
||||
string u8ResourceName = Utf8::encode( resourceName );
|
||||
if( !resourceIncluded.insert( resourceName ).second )
|
||||
continue;
|
||||
if( !resourceIncluded.insert( resourceName ).second ) {
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
Mutex::Lock _( dataMutex );
|
||||
data.clear();
|
||||
|
|
Loading…
Reference in a new issue