Move the GameObject

hi, i have a problem with game object… i have the cube in scene and i put a script to destroy that cube. before the cube is destroyed the camera following the cube, but if the cube is destroy, the camera not follow the cube and get a error. i just want to make the camera still follow the cube although the cube has been destroyed (sorry for my language)… what should i do ? i`m stuck in a week…

So maybe stop rendering the cube instead of destroying it?