My car keeps stalling when put into gear (automtic) on 1997 Acura CL

The car starts up good n runs when cold but once the car warms up it
When you put it in gear. Once it stalls got to wait a few minutes to restart cuz if i try to start right away it wont start wait about 5mins n it start up fine

Asked by for the 1997 Acura CL
sounds like you have a bad distributor