The proximity sensor takes care of preventing these kind of things.