mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-26 11:05:41 -04:00
OpenGLDevice: Fix crash when driver doesn't support binaries
This commit is contained in:
parent
7d76643c02
commit
5bbb7cf906
@ -299,7 +299,8 @@ GLuint OpenGLDevice::LookupProgramCache(const OpenGLPipeline::ProgramCacheKey& k
|
|||||||
item.file_compressed_size = 0;
|
item.file_compressed_size = 0;
|
||||||
if (item.program_id != 0)
|
if (item.program_id != 0)
|
||||||
{
|
{
|
||||||
AddToPipelineCache(&item);
|
if (m_pipeline_disk_cache_file)
|
||||||
|
AddToPipelineCache(&item);
|
||||||
item.reference_count++;
|
item.reference_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -938,8 +939,11 @@ bool OpenGLDevice::DiscardPipelineCache()
|
|||||||
void OpenGLDevice::ClosePipelineCache()
|
void OpenGLDevice::ClosePipelineCache()
|
||||||
{
|
{
|
||||||
const ScopedGuard file_closer = [this]() {
|
const ScopedGuard file_closer = [this]() {
|
||||||
std::fclose(m_pipeline_disk_cache_file);
|
if (m_pipeline_disk_cache_file)
|
||||||
m_pipeline_disk_cache_file = nullptr;
|
{
|
||||||
|
std::fclose(m_pipeline_disk_cache_file);
|
||||||
|
m_pipeline_disk_cache_file = nullptr;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!m_pipeline_disk_cache_changed)
|
if (!m_pipeline_disk_cache_changed)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user