mirror of https://github.com/axmolengine/axmol.git
Merge pull request #7165 from timur-losev/v3
- Due to the fact that map::insert doesn't allow to insert an element by...
This commit is contained in:
commit
0ef26e208b
cocos/renderer
|
@ -387,8 +387,10 @@ GLProgram* GLProgramCache::getGLProgram(const std::string &key)
|
|||
|
||||
void GLProgramCache::addGLProgram(GLProgram* program, const std::string &key)
|
||||
{
|
||||
if (program)
|
||||
program->retain();
|
||||
_programs.insert( std::make_pair( key, program) );
|
||||
|
||||
_programs[key] = program;
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
Loading…
Reference in New Issue