UI_construct_prompt: check for NULL when allocating prompt