added NULL parameter checking to API functions
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: texobj.c,v 1.25 2000/08/02 20:16:03 brianp Exp $ */
|
/* $Id: texobj.c,v 1.26 2000/08/03 14:03:17 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -398,6 +398,8 @@ _mesa_GenTextures( GLsizei n, GLuint *texName )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!texName)
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This must be atomic (generation and allocation of texture IDs)
|
* This must be atomic (generation and allocation of texture IDs)
|
||||||
@@ -434,6 +436,9 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *texName)
|
|||||||
|
|
||||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glDeleteTextures");
|
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glDeleteTextures");
|
||||||
|
|
||||||
|
if (!texName)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i=0;i<n;i++) {
|
for (i=0;i<n;i++) {
|
||||||
struct gl_texture_object *t;
|
struct gl_texture_object *t;
|
||||||
if (texName[i]>0) {
|
if (texName[i]>0) {
|
||||||
@@ -617,6 +622,9 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!priorities)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
if (texName[i] > 0) {
|
if (texName[i] > 0) {
|
||||||
struct gl_texture_object *t = (struct gl_texture_object *)
|
struct gl_texture_object *t = (struct gl_texture_object *)
|
||||||
@@ -650,6 +658,9 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName,
|
|||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!texName || !residences)
|
||||||
|
return GL_FALSE;
|
||||||
|
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
struct gl_texture_object *t;
|
struct gl_texture_object *t;
|
||||||
if (texName[i] == 0) {
|
if (texName[i] == 0) {
|
||||||
|
Reference in New Issue
Block a user