Injury threatened Wimbledon dream: Barty