Commits

Holger Frydrych committed 1119bb1 Merge

Merge with upstream

Comments (0)

Files changed (1)

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;