mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 07:49:19 +01:00
ShaderCache: Fix crash if pipeline from uid cache fails creation
This commit is contained in:
parent
96aa762d1e
commit
c6b45c5ca9
@ -641,6 +641,7 @@ const AbstractPipeline* ShaderCache::InsertGXPipeline(const GXPipelineUid& confi
|
||||
auto& entry = m_gx_pipeline_cache[config];
|
||||
entry.second = false;
|
||||
if (!entry.first && pipeline)
|
||||
{
|
||||
entry.first = std::move(pipeline);
|
||||
|
||||
if (g_ActiveConfig.bShaderCache)
|
||||
@ -654,6 +655,7 @@ const AbstractPipeline* ShaderCache::InsertGXPipeline(const GXPipelineUid& confi
|
||||
static_cast<u32>(cache_data.size()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return entry.first.get();
|
||||
}
|
||||
@ -665,6 +667,7 @@ ShaderCache::InsertGXUberPipeline(const GXUberPipelineUid& config,
|
||||
auto& entry = m_gx_uber_pipeline_cache[config];
|
||||
entry.second = false;
|
||||
if (!entry.first && pipeline)
|
||||
{
|
||||
entry.first = std::move(pipeline);
|
||||
|
||||
if (g_ActiveConfig.bShaderCache)
|
||||
@ -678,6 +681,7 @@ ShaderCache::InsertGXUberPipeline(const GXUberPipelineUid& config,
|
||||
static_cast<u32>(cache_data.size()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return entry.first.get();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user