Skip to content

Improve null root handling

Alexei Kotov requested to merge Capostrophic/openmw:nullroots into master

Fixes #5963 (closed).

Minor stuff.
It's mostly fine for a NIF file to contain roots that don't point to anything especially now that OpenMW .47 supports more than one root record, and that shouldn't lead to assertion failures in debug builds, so the assertions were replaced with null checks. Actual null records roots may point to which don't lead to a warning message are catched by assertions earlier in the loading process.

List of roots has been made const in Bullet NIF loader and the message warning the user about null roots being found should be more clear.

#5963 (closed) might actually be "a regression" of sorts as the affected files probably never had the assertions triggered in 0.46.0. Either way this doesn't need a changelog entry as it's already covered by two root node issues.

Merge request reports