diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index c7a30cc4..65da73f5 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -257,10 +257,11 @@ std::tuple CB3DJSONMeshFileLoader::readChunkTEXS() { B3DTexture.TextureName.replace('\\','/'); } else { - + if (t.contains("name") && !t["name"].is_string()) { return {false, "\"name\" in TEXS block index (" + std::to_string(index) +") is not a string."}; } + return {false, "Missing \"name\" in TEXS block index (" + std::to_string(index) +")."}; }