20131125 Fix null point exception caused by quitApplication.