From 23d0ee855082c0777a5cad12b4f4dece200fccd1 Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Sun, 19 Dec 2010 17:17:30 +0000 Subject: [PATCH] Minor modification in sf::Renderer git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1757 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Graphics/Renderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SFML/Graphics/Renderer.cpp b/src/SFML/Graphics/Renderer.cpp index 117fcde18..379dade1a 100644 --- a/src/SFML/Graphics/Renderer.cpp +++ b/src/SFML/Graphics/Renderer.cpp @@ -246,7 +246,7 @@ void Renderer::SetTexture(const Image* texture) myTextureId = texture ? texture->myTexture : 0; myTextureIsValid = true; } - else if (texture) + else if (texture && myTextureIsValid) { // If the texture was already the current one, make sure that // it is synchronized (in case it was modified since last use) @@ -273,7 +273,7 @@ void Renderer::SetShader(const Shader* shader) myShaderIsValid = true; } } - else if (shader) + else if (shader && myShaderIsValid) { // If the shader was already the current one, make sure that // it is synchronized (in case it was modified since last use)