Fix crashes with invalid XRefs

3ds max OpenCollada exporter plugin crashes when exporting scene containing broken XRefs.
Crashes occur because of null pointer dereferencing.
Here is probable solution. Any comments and feedback would be highly appreciated.
Thanks for attention.