diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 387996a957..eeb9614070 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -219,7 +219,10 @@ void ProgramShaderCache::Shutdown(void) { PCache::iterator iter = pshaders.begin(); for (; iter != pshaders.end(); ++iter) + { g_program_disk_cache.Append(iter->second.uid, iter->second.GetProgram(), iter->second.Size()); + iter->second.FreeProgram(); + } g_program_disk_cache.Sync(); g_program_disk_cache.Close(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h index d0743326dd..6089f205e7 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h @@ -100,6 +100,7 @@ public: void FreeProgram() { delete [] binary; + binary = NULL; } GLint Size()