From fadbb249c6b23e006aca61f490eb37212f48715b Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Sun, 26 Nov 2023 09:32:28 -0500 Subject: [PATCH] Add a note now we can actually start working --- source/Irrlicht/CB3DJSONMeshFileLoader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index 153c1599..62911dd1 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -141,6 +141,7 @@ IAnimatedMesh* CB3DJSONMeshFileLoader::createMesh(io::IReadFile* file) { // Irrlicht doesn't null terminate the raw output. So we must doe it ourself. buffer[file->getSize()] = '\0'; + // We have to catch a JSON parse error or else the game will segfault. json data; try { @@ -167,7 +168,7 @@ IAnimatedMesh* CB3DJSONMeshFileLoader::createMesh(io::IReadFile* file) { IAnimatedMesh* finalizedModel = parseModel(data); - return nullptr; + return finalizedModel; } } // namespace scene