From d2ececed05a3c46238a2340d41b42abaa5e604d9 Mon Sep 17 00:00:00 2001 From: binary1248 Date: Sun, 3 Jun 2018 19:40:30 +0200 Subject: [PATCH] Fixed RenderTexture::display() dereferencing a NULL pointer when being called before RenderTexture::create(). --- src/SFML/Graphics/RenderTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SFML/Graphics/RenderTexture.cpp b/src/SFML/Graphics/RenderTexture.cpp index 0805627b7..51abee923 100644 --- a/src/SFML/Graphics/RenderTexture.cpp +++ b/src/SFML/Graphics/RenderTexture.cpp @@ -161,7 +161,7 @@ bool RenderTexture::setActive(bool active) void RenderTexture::display() { // Update the target texture - if (priv::RenderTextureImplFBO::isAvailable() || setActive(true)) + if (m_impl && (priv::RenderTextureImplFBO::isAvailable() || setActive(true))) { m_impl->updateTexture(m_texture.m_texture); m_texture.m_pixelsFlipped = true;