Fixed Render[Texture|Window] crash when released while on use

Former-commit-id: 30b4bd5b7eb7b665cecfe6366117b7a3b4290202
This commit is contained in:
Lynix
2013-10-09 10:08:17 +02:00
parent 185b450c64
commit 239ce4e323
2 changed files with 7 additions and 0 deletions

View File

@@ -358,6 +358,9 @@ void NzRenderTexture::Destroy()
{
if (m_impl)
{
if (IsActive())
NzRenderer::SetTarget(nullptr);
bool canFreeFBO = true;
#if NAZARA_RENDERER_SAFE
if (NzContext::GetCurrent() != m_impl->context)