Don't crash when a submodel fails to load.
This commit is contained in:
@@ -350,6 +350,7 @@ sgLoad3DModel_internal(const SGPath& path,
|
|||||||
} catch (const sg_exception &t) {
|
} catch (const sg_exception &t) {
|
||||||
SG_LOG(SG_INPUT, SG_ALERT, "Failed to load submodel: " << t.getFormattedMessage()
|
SG_LOG(SG_INPUT, SG_ALERT, "Failed to load submodel: " << t.getFormattedMessage()
|
||||||
<< "\n\tfrom:" << t.getOrigin());
|
<< "\n\tfrom:" << t.getOrigin());
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> submodel_final = submodel;
|
osg::ref_ptr<osg::Node> submodel_final = submodel;
|
||||||
|
|||||||
Reference in New Issue
Block a user