Skip to content

Commit

Permalink
Additional opt
Browse files Browse the repository at this point in the history
  • Loading branch information
xezon committed Sep 21, 2024
1 parent 8a0ae72 commit 8fbff61
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/w3d/renderer/textureloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,10 @@ void TextureLoader::Request_Thumbnail(TextureBaseClass *texture)
// Possibly this code isn't ever actually used with Thumbnail code in general being minimally
// called.
if (texture->Get_Thumbnail_Load_Task() != nullptr) {
FastCriticalSectionClass::LockClass lock(g_foregroundCritSec);
g_foregroundQueue.Remove(texture->Get_Thumbnail_Load_Task());
{
FastCriticalSectionClass::LockClass lock(g_foregroundCritSec);
g_foregroundQueue.Remove(texture->Get_Thumbnail_Load_Task());
}
texture->Get_Thumbnail_Load_Task()->Destroy();
}
} else {
Expand Down Expand Up @@ -496,7 +498,8 @@ void TextureLoader::Process_Foreground_Thumbnail(TextureLoadTaskClass *task)
switch (task->Get_Load_State()) {
case TextureLoadTaskClass::STATE_NONE:
Load_Thumbnail(task->Get_Texture());
case TextureLoadTaskClass::STATE_FOREGROUND_OVERRIDE: // Fallthrough
[[fallthrough]];
case TextureLoadTaskClass::STATE_FOREGROUND_OVERRIDE:
task->Destroy();
break;
default:
Expand Down

0 comments on commit 8fbff61

Please sign in to comment.