ofXML: Two locations where null pointers could be called.

Fixes #3049