Don't crash if Cg is init with NULL.