In a saucepan, whisk together sugar, cornstarch, and salt.
Gradually add milk while stirring to avoid lumps.
Cook over medium heat, stirring constantly until the mixture thickens and bubbles.
In a separate bowl, whisk egg yolks.
Slowly add a small amount of the hot mixture to the egg yolks to temper them.
Pour the tempered yolks back into the saucepan and cook for another 2 minutes.
Remove from heat and stir in butter and vanilla.
Slice bananas and layer them on the bottom of the crust.
Pour the custard over the bananas, smoothing it out.
Cover with plastic wrap and chill in the refrigerator for at least 2 hours.