null catch on equirectangular cubemap load.
@@ -91,6 +91,8 @@ tex2d_t tex2d_create_cubemap_file(const char *equirectangular_file) {
const vec3 right[6] = { {0,0,-1}, {0,0,1}, {1,0,0}, {1,0,0}, {1,0,0}, {-1,0,0} };
tex2d_t equirect = tex2d_create_file(equirectangular_file);
+ if (equirect == nullptr)
+ return nullptr;
equirect->header.id = string_hash("temp/equirectid");
material_t convert_material = material_find("default/equirect_convert");
