“Good genes” models of sexual selection predict that male courtship displays can advertise genetic quality and that, by mating with males with extreme displays, females can obtain genetic benefits for their offspring. However, because the relative performance of different genotypes can vary across environments, these genetic benefits may depend on the environmental context; in which case, static mating preferences may not be adaptive. To better understand how selection acts on the preference that female gray tree frogs (Hyla versicolor) express for long advertisement calls, I tested for genetic benefits in two realistic natural environments, by comparing the performance of half-sibling offspring sired by males with long versus short calls. Tadpoles from twelve such maternal half-sibships were raised in enclosures in their natal pond at two densities. In the low-density treatment, offspring of long-call males were larger at metamorphosis than were offspring of short-call males, whereas in the high-density treatment, offspring of males with long calls tended to metamorphose later than offspring of males with short calls. Thus, although the genes indicated by long calls were advantageous under low-density conditions, they were not beneficial under all conditions, suggesting that a static preference for long calls may not be adaptive in all environments. Such a genotype-by-environment interaction in the genetic consequences of mate choice predicts that when the environment is variable, selection may favor plasticity in female preferences or female selectivity among environments to control the conditions experienced by the offspring.