Here you should add the graceful failure behavior for release

    if (attitudeSettings == NULL)
        return;