Glass is microwave safe even when it's cold.
I've never had a problem taking cold glass bowls or other glass containers out of the refrigerator and putting it directly into the microwave.
But it's recommended if putting into a regular oven to preheat the oven first and then put the cold glass into the oven to stop the risk of it shattering.