diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index df7b349635..f11e90bd85 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -1085,6 +1085,8 @@ unsigned RageDisplay_OGL::CreateTexture( PixelFormat pixfmt, SDL_Surface* img ) { + ASSERT( pixfmt < NUM_PIX_FORMATS ); + unsigned int uTexHandle; glGenTextures(1, reinterpret_cast(&uTexHandle)); ASSERT(uTexHandle);