   device maybe lost?
  in render loop,there areif (device){}device could be NULL?   
  Well NULL is defined as 0, so the call if(device) should fail if device is actually null. That's not to say the device could not become null at some poitn in the loop though.   ;  I mean in runtime of game,use if(device){}indicate device could be lost at render of game . is it true?   