]> git.sesse.net Git - movit/commitdiff
Add some asserts.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 29 Mar 2014 22:47:08 +0000 (23:47 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 29 Mar 2014 22:47:12 +0000 (23:47 +0100)
resource_pool.cpp

index 5abc1b28b81729671bd0e4758ae9803d53c096f9..db449dd7084f412ef63551a04a823245f7a9eff1 100644 (file)
@@ -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<GLuint>::iterator freelist_it = texture_freelist.begin();