summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/bufferobj.h')
-rw-r--r--src/mesa/main/bufferobj.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/bufferobj.h b/src/mesa/main/bufferobj.h
index b4e70f2f08a..c0d5a641a46 100644
--- a/src/mesa/main/bufferobj.h
+++ b/src/mesa/main/bufferobj.h
@@ -53,7 +53,7 @@ _mesa_bufferobj_mapped(const struct gl_buffer_object *obj)
static inline GLboolean
_mesa_is_bufferobj(const struct gl_buffer_object *obj)
{
- return obj->Name != 0;
+ return obj != NULL && obj->Name != 0;
}