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 committed by Lukas Dürrenberger
parent 6e84b2d97d
commit b9303866a6

View File

@ -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;