Which are correct:
1) Don't go out of the apartment leaving the gas on.
2) Don't work out too much hurting yourself.
3) Don't go out in a t-shirt thereby exposing yourself to the cold.
In '1' the person is supposed not to do a combination of things. He or she can go out of the apartment, but cannot leave the gas on and go out of the apartment.
In the two other sentences one thing is just the normal consequence of the other. If you do the first thing, the second one will ensue, therefore you should not do the first thing.