Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Dec 27, 2024
1 parent 588aa13 commit a880029
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/dict/dsl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1608,14 +1608,12 @@ void DslResourceRequest::run()
{ n, dict.getResourceDir1() + resourceName, dict.getResourceDir2() + resourceName } );
qDebug( "found dsl resource name is %s", fp.c_str() );
try {
QMutexLocker _( &dataMutex );

if ( !fp.empty() ) {
QMutexLocker _( &dataMutex );
File::loadFromFile( fp, data );
}
else if ( dict.resourceZip.isOpen() ) {
QMutexLocker _( &dataMutex );

if ( !dict.resourceZip.loadFile( Text::toUtf32( resourceName ), data ) ) {
throw std::runtime_error( "Failed to load file from resource zip" );
}
Expand All @@ -1626,13 +1624,9 @@ void DslResourceRequest::run()

if ( Filetype::isNameOfTiff( resourceName ) ) {
// Convert it

QMutexLocker _( &dataMutex );
GdTiff::tiff2img( data );
}

QMutexLocker _( &dataMutex );

hasAnyData = true;
}
catch ( std::exception & ex ) {
Expand Down

0 comments on commit a880029

Please sign in to comment.