Does "crack" mean the same thing in these two sentences?

To crack a whip.

The performance was fine until he cracked that dead baby joke.
different meanings