summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/bgfx/texturemanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/render/bgfx/texturemanager.cpp')
-rw-r--r--src/osd/modules/render/bgfx/texturemanager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/osd/modules/render/bgfx/texturemanager.cpp b/src/osd/modules/render/bgfx/texturemanager.cpp
index adf31790aec..3c32bcd13c3 100644
--- a/src/osd/modules/render/bgfx/texturemanager.cpp
+++ b/src/osd/modules/render/bgfx/texturemanager.cpp
@@ -28,7 +28,15 @@ texture_manager::~texture_manager()
void texture_manager::add_provider(std::string name, bgfx_texture_handle_provider* provider)
{
- m_textures[name] = provider;
+ std::map<std::string, bgfx_texture_handle_provider*>::iterator iter = m_textures.find(name);
+ if (iter != m_textures.end())
+ {
+ iter->second = provider;
+ }
+ else
+ {
+ m_textures[name] = provider;
+ }
}
bgfx_texture* texture_manager::create_texture(std::string name, bgfx::TextureFormat::Enum format, uint32_t width, uint32_t height, void* data, uint32_t flags)