diff --git a/src/nostalgia/studio/lib/project.hpp b/src/nostalgia/studio/lib/project.hpp index 5ea1c681..8f91bd77 100644 --- a/src/nostalgia/studio/lib/project.hpp +++ b/src/nostalgia/studio/lib/project.hpp @@ -99,13 +99,13 @@ void Project::writeObj(QString path, T *obj) const { writeBuff(path, ox::bit_cast(buff.data()), buff.size()); // write type descriptor - const auto type = ox::buildTypeDef(obj); - oxRequireMT(typeOut, ox::writeClaw(type.value, ox::ClawFormat::Organic)); + oxRequireT(type, ox::buildTypeDef(obj)); + oxRequireMT(typeOut, ox::writeClaw(type.get(), ox::ClawFormat::Organic)); // replace garbage last character with new line typeOut.back().value = '\n'; // write to FS QString descPath = "/.nostalgia/type_descriptors/"; - const auto typePath = descPath + type.value->typeName.c_str(); + const auto typePath = descPath + type->typeName.c_str(); mkdir(descPath); writeBuff(typePath, ox::bit_cast(typeOut.data()), typeOut.size()); emit fileUpdated(path);