Browse Source

Minor fix to GL texture cleanup

Don't clear any data if it's a dummy texture.
jp9000 11 years ago
parent
commit
b2885480fa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libobs-opengl/gl-texture2d.c

+ 1 - 1
libobs-opengl/gl-texture2d.c

@@ -132,7 +132,7 @@ void texture_destroy(texture_t tex)
 	if (tex->cur_sampler)
 		samplerstate_destroy(tex->cur_sampler);
 
-	if (tex->is_dynamic && tex2d->unpack_buffer)
+	if (!tex->is_dummy && tex->is_dynamic && tex2d->unpack_buffer)
 		gl_delete_buffers(1, &tex2d->unpack_buffer);
 
 	if (tex->texture)