don't attempt texture binding before the texture pool is setup

This commit is contained in:
Justin R. Miller
2014-03-19 14:22:00 -07:00
parent 00a3245ce8
commit 4dc6aa9aec

View File

@@ -154,11 +154,7 @@ void Raster::bind(bool linear) {
return;
}
if (img && !textured) {
if (!texturepool) {
fprintf(stderr, "no available texture pool\n");
return;
}
if (img && !textured && texturepool) {
texture = texturepool->getTextureID();
glBindTexture(GL_TEXTURE_2D, texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);