fix crash when loading empty material meshes