my car (ford focus) did the very same thing the other morning, the engine was warm but every time i had to stop it just died on me
after a few times and the car spending aday on the work carpark it was fine and has never done it since.
i just put it down to electrical gremlins.