Added warning

Former-commit-id: b6956df1ded62a23140f4c44f0fd8b677c63c981
This commit is contained in:
Lynix 2014-03-04 19:35:51 +01:00
parent 0f2cab56ff
commit 2990843f31
1 changed files with 8 additions and 0 deletions

View File

@ -292,6 +292,14 @@ void NzCamera::UpdateViewMatrix() const
void NzCamera::UpdateViewport() const
{
#if NAZARA_GRAPHICS_SAFE
if (!m_target)
{
NazaraError("Camera has no render target");
return;
}
#endif
unsigned int width = m_target->GetWidth();
unsigned int height = std::max(m_target->GetHeight(), 1U);