diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp index e5c62fd66..82d91ffc6 100644 --- a/src/SFML/Graphics/Shader.cpp +++ b/src/SFML/Graphics/Shader.cpp @@ -96,6 +96,7 @@ bool Shader::LoadFromFile(const std::string& filename) } // Read the shader code from the file + myFragmentShader.clear(); std::string line; while (std::getline(file, line)) myFragmentShader += line + "\n";