Convert mju_openResource to write warnings to a given error string.
PiperOrigin-RevId: 606907392 Change-Id: Ic70e980aa9ba2bdbe1787773f51749b34f74afed
This commit is contained in:
committed by
Copybara-Service
parent
f50a44e193
commit
266161ee4c
@@ -722,8 +722,10 @@ mjModel* mj_loadModel(const char* filename, const mjVFS* vfs) {
|
||||
mjResource* r = NULL;
|
||||
|
||||
// first try vfs, otherwise try a provider or OS filesystem
|
||||
if ((r = mju_openVfsResource(filename, vfs)) == NULL) {
|
||||
if ((r = mju_openResource(filename)) == NULL) {
|
||||
if (!(r = mju_openVfsResource(filename, vfs))) {
|
||||
char error[1024];
|
||||
if (!(r = mju_openResource(filename, error, 1024))) {
|
||||
mju_warning("%s", error);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user