From 3311809e016e59a5111e2868ea1563cb9b05867a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 11 Sep 2020 11:18:51 +0200 Subject: [PATCH] fixed a possible crash with airbuf missing --- shaders.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders.cpp b/shaders.cpp index 8af15ecb..b44f9a23 100644 --- a/shaders.cpp +++ b/shaders.cpp @@ -416,7 +416,7 @@ void display_data::set_projection(int ed, ld shift) { #endif #if MAXMDIM >= 4 - if(selected->tAirMap != -1) { + if(selected->tAirMap != -1 && airbuf) { glActiveTexture(GL_TEXTURE0 + AIR_BINDING); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);