From e73f77b26fef44b380233d8a1a5ff76739dd4e60 Mon Sep 17 00:00:00 2001 From: milek7 Date: Fri, 11 Jan 2019 23:15:41 +0100 Subject: [PATCH] fix material cache --- material.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/material.cpp b/material.cpp index ce3a97b0..56237bee 100644 --- a/material.cpp +++ b/material.cpp @@ -378,8 +378,8 @@ material_manager::create( std::string const &Filename, bool const Loadnow ) { // if we have material name and shader it means resource was processed succesfully material.finalize(Loadnow); materialhandle = m_materials.size(); - m_materials.emplace_back( std::move(material) ); m_materialmappings.emplace( material.name, materialhandle ); + m_materials.emplace_back( std::move(material) ); } else { // otherwise record our failure to process the resource, to speed up subsequent attempts