Masses and progenitor evolutionary states of TypeII supernovae remain almost unconstrained by direct observations. Only one robust observation of a progenitor (SN1987A) and one plausible observation (SN1993J) are available. Neither matched theoretical predictions and in this Letter we report limits on a third progenitor (SN1999gi). The Hubble Space Telescope has imaged the site of the TypeII-P supernova SN1999gi with the WFPC2 in two filters (F606W and F300W) prior to explosion. The distance to the host galaxy (NGC3184) of 7.9Mpc means that the most luminous, massive stars are resolved as single objects in the archive images. The supernova occurred in a resolved, young OB association 2.3kpc from the centre of NGC3184 with an association age of about 4Myrs. Follow-up images of SN1999gi with WFPC2 taken 14 months after discovery determine the precise position of the SN on the pre-explosion frames. An upper limit of the absolute magnitude of the progenitor is estimated (M_v >= -5.1). By comparison with stellar evolutionary tracks this can be interpreted as a stellar mass, and we determine an upper mass limit of 9(+3/-2)M_solar. We discuss the possibility of determining the masses or mass limits for numerous nearby core-collapse supernovae using the HST archive enhanced by our current SNAP programme.