Fixed RenderTexture::display() dereferencing a NULL pointer when being called before RenderTexture::create().

This commit is contained in:
binary1248 2018-06-03 19:40:30 +02:00
parent 1dcad60878
commit d2ececed05
No known key found for this signature in database
GPG Key ID: E5E52A5D6082224A

View File

@ -161,7 +161,7 @@ bool RenderTexture::setActive(bool active)
void RenderTexture::display() void RenderTexture::display()
{ {
// Update the target texture // 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_impl->updateTexture(m_texture.m_texture);
m_texture.m_pixelsFlipped = true; m_texture.m_pixelsFlipped = true;