Game Development Community

TGEA 1.7.0 - GuiCanvas::RenderFrame assumption

by Jeremiah Fulbright · in Torque Game Engine Advanced · 05/10/2008 (12:40 pm) · 1 replies

It seems there is a bad assumption being made in GuiCanvas::renderFrame with:

Point2I size = GFX->getActiveRenderTarget()->getSize();


In a perfect world, this is fine, but when using a Null Video device, getActiveRenderTarget() returns a NULL.. and its hard to getSize() that NULL... :)

Fixed:

GFXTarget* renderTarget = GFX->getActiveRenderTarget();
	if(renderTarget == NULL)
	{
		PROFILE_END();
		return;
	}

	Point2I size = renderTarget->getSize();

#1
05/13/2008 (1:51 pm)
Good catch! This will be fixed in the next version =)