Do not delete attached specs after compilation.
Also, copy them when copying the spec. PiperOrigin-RevId: 688998464 Change-Id: I7229fd8032eafede582194ccf73ab4160fe06768
This commit is contained in:
committed by
Copybara-Service
parent
e14aebfd16
commit
d17d9e835c
+2
-1
@@ -26,7 +26,8 @@ mjSpec* ParseXML(const char* filename, const mjVFS* vfs, char* error, int nerror
|
||||
|
||||
// Returns a newly-allocated mjSpec, loaded from the contents of xml.
|
||||
// On failure returns nullptr and populates the error array if present.
|
||||
mjSpec* ParseSpecFromString(std::string_view xml, char* error = nullptr, int nerror = 0);
|
||||
mjSpec* ParseSpecFromString(std::string_view xml, const mjVFS* vfs = nullptr,
|
||||
char* error = nullptr, int nerror = 0);
|
||||
|
||||
// Main writer function
|
||||
std::string WriteXML(const mjModel* m, const mjSpec* spec, char* error, int nerror);
|
||||
|
||||
Reference in New Issue
Block a user