Add check for a material map before correcting any missing UV coordinates.