Fixed a possible memory error.  Refs #7506.