summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/fbobject.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 07489f96205..324a3032535 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -509,10 +509,12 @@ _mesa_IsRenderbufferEXT(GLuint renderbuffer)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- if (renderbuffer && lookup_renderbuffer(ctx, renderbuffer))
- return GL_TRUE;
- else
- return GL_FALSE;
+ if (renderbuffer) {
+ struct gl_renderbuffer *rb = lookup_renderbuffer(ctx, renderbuffer);
+ if (rb != NULL && rb != &DummyRenderbuffer)
+ return GL_TRUE;
+ }
+ return GL_FALSE;
}
@@ -843,10 +845,12 @@ _mesa_IsFramebufferEXT(GLuint framebuffer)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- if (framebuffer && lookup_framebuffer(ctx, framebuffer))
- return GL_TRUE;
- else
- return GL_FALSE;
+ if (framebuffer) {
+ struct gl_framebuffer *rb = lookup_framebuffer(ctx, framebuffer);
+ if (rb != NULL && rb != &DummyFramebuffer)
+ return GL_TRUE;
+ }
+ return GL_FALSE;
}