From 7538612384304a9c209ac12fe07f2822427a5aeb Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 29 Mar 2014 23:47:08 +0100 Subject: [PATCH] Add some asserts. --- resource_pool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resource_pool.cpp b/resource_pool.cpp index 5abc1b2..db449dd 100644 --- a/resource_pool.cpp +++ b/resource_pool.cpp @@ -186,6 +186,9 @@ void ResourcePool::release_glsl_program(GLuint glsl_program_num) GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLsizei height) { + assert(width > 0); + assert(height > 0); + pthread_mutex_lock(&lock); // See if there's a texture on the freelist we can use. for (list::iterator freelist_it = texture_freelist.begin(); -- 2.39.2