diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index 7f5897bd..535aeb25 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -185,10 +185,11 @@ bool load(json data) { return true; } -void CB3DJSONMeshFileLoader::cleanUp(std::string failure) { +CSkinnedMesh* CB3DJSONMeshFileLoader::cleanUp(std::string failure) { os::Printer::log(failure.c_str(), ELL_WARNING); AnimatedMesh->drop(); AnimatedMesh = 0; + return AnimatedMesh; } /** @@ -218,6 +219,8 @@ bool CB3DJSONMeshFileLoader::parseJSONFile(io::IReadFile* file) { os::Printer::log("JSON: Failed to parse!", ELL_WARNING); return false; } + + // I'm not sure if buffer and output gets dropped here. return true; } diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.h b/source/Irrlicht/CB3DJSONMeshFileLoader.h index 693b690e..9b60771c 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.h +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.h @@ -27,7 +27,7 @@ private: json JSONDataContainer; // Methods. - void cleanUp(std::string); + CSkinnedMesh* cleanUp(std::string); bool parseJSONFile(io::IReadFile* file); public: