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
|
@ -387,8 +387,10 @@ GLProgram* GLProgramCache::getGLProgram(const std::string &key)
|
||||||
|
|
||||||
void GLProgramCache::addGLProgram(GLProgram* program, const std::string &key)
|
void GLProgramCache::addGLProgram(GLProgram* program, const std::string &key)
|
||||||
{
|
{
|
||||||
program->retain();
|
if (program)
|
||||||
_programs.insert( std::make_pair( key, program) );
|
program->retain();
|
||||||
|
|
||||||
|
_programs[key] = program;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
Loading…
Reference in New Issue