Return reference to a local static instead of a reference to 0 in an error cases (was undefined c++).

Thx @floriang for reporting at http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=50877



git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5113 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2015-07-30 21:53:21 +00:00
parent 39b98b218c
commit 3dbf7c9de6
1 changed files with 5 additions and 1 deletions

View File

@ -2689,7 +2689,11 @@ bool COGLES2Driver::endScene()
if (index < UserClipPlane.size())
return UserClipPlane[index].Plane;
else
return *((core::plane3df*)0);
{
_IRR_DEBUG_BREAK_IF(true) // invalid index
static const core::plane3df dummy;
return dummy;
}
}
core::dimension2du COGLES2Driver::getMaxTextureSize() const