It can do harm if put it in the bag while it is running and will leave like that for some time, as it needs an air flow to cool the processor. The chances to do the damage are not very high though, most likely the computer will be switched off by overheating protection mechanisms. If you close the lid and leave it on the table, while processor vents are not obstructed than no harm will happen.