Fix error reporting for lost contexts

Trac #19246 Issue=262 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@906 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 7f4dee14
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 905
#define BUILD_REVISION 906
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
......@@ -2707,10 +2707,7 @@ GLenum __stdcall glGetError(void)
if (context)
{
if (context->isContextLost())
return GL_OUT_OF_MEMORY;
else
return context->getError();
return context->getError();
}
return GL_NO_ERROR;
......
......@@ -98,9 +98,18 @@ Context *getNonLostContext()
{
Context *context = getContext();
if (context && !context->isContextLost())
return context;
if (context)
{
if (context->isContextLost())
{
error(GL_OUT_OF_MEMORY);
return NULL;
}
else
{
return context;
}
}
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment