Commits

David Rogers committed cb844cd Merge

Merged in binarycrusader/ogre-pull-fixes/v1-8 (pull request #8)

  • Participants
  • Parent commits 1fd5f25, 960fc9f
  • Branches v1-8

Comments (0)

Files changed (1)

File Samples/Browser/include/SampleBrowser.h

 				mShaderGenerator->setShaderCachePath(shaderCachePath);		
 #endif
 #endif
-				// Create and register the material manager listener.
-				mMaterialMgrListener = new ShaderGeneratorTechniqueResolverListener(mShaderGenerator);				
-				Ogre::MaterialManager::getSingleton().addListener(mMaterialMgrListener);
+				// Create and register the material manager listener if it doesn't exist yet.
+				if (mMaterialMgrListener == NULL) {
+					mMaterialMgrListener = new ShaderGeneratorTechniqueResolverListener(mShaderGenerator);
+					Ogre::MaterialManager::getSingleton().addListener(mMaterialMgrListener);
+				}
 			}
 
 			return true;