From 00d7d2a7743dc0744809b320c0ae5f8a75e57044 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 29 Jan 2019 21:52:56 +0100 Subject: [PATCH] Fix a crash on exit caused by shader deletion. --- src/lol/gpu/shader.h | 2 +- src/mesh/mesh.cpp | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lol/gpu/shader.h b/src/lol/gpu/shader.h index a4c5b582..8b136311 100644 --- a/src/lol/gpu/shader.h +++ b/src/lol/gpu/shader.h @@ -314,7 +314,7 @@ private: class ShaderData; //Shader ---------------------------------------------------------------------- -class Shader : public Entity +class Shader { public: static std::shared_ptr Create(std::string const &name, std::string const &code); diff --git a/src/mesh/mesh.cpp b/src/mesh/mesh.cpp index eccd4c5c..6953a6b9 100644 --- a/src/mesh/mesh.cpp +++ b/src/mesh/mesh.cpp @@ -61,13 +61,10 @@ SubMesh::SubMesh(std::shared_ptr shader, std::shared_ptr shader) { - Ticker::Unref(m_shader.get()); m_shader = shader; - Ticker::Ref(m_shader.get()); } std::shared_ptr SubMesh::GetShader()