A glass toy is more likely to crack or fracture if you suddenly take it from a very cold temperature to a very hot one (or vice versa), or if there was some damage previous to the temperature change, such as from a fall. Glass can be boiled to sterilize it without cracking, and I doubt most people will put their toys anywhere hotter than that. So long as you don't swing from one extreme to the other, it's usually fine. ToyTimeTim actually did a workshop on it here
, which showed that sometimes even rapid temperature swings won't destroy glass toys (though of course it's usually best to play it safe and not do this).
It has happened, though, in at least a few cases. I've heard of glass toys occasionally cracking in sex shops due to temperature changes, though I personally suspect that those toys might have been poorly-made. This is why inspecting glass toys for damage before each use is so important. You can never be too careful.