add: if (!app)
context: static void init(int& argc, char *argv[]){  QString  acctPath, foldersPath;  KConfig* cfg;  app = new KApplication(argc, argv, "kmail");  kbp = new KBusyPtr;  cfg = app->getConfig();  keys = new KStdAccel(cfg);  oldMsgHandler = qInstallMsgHandler(kmailMsgHandler);  QDir dir;  QString d = KApplication::localkdedir();  d += "/share/apps";  dir.setPath(d.data());  if(!dir.exists()){    dir.mkdir(d.data());    chmod(d.data(), S_IRWXU);  }  d += "/kmail";  dir.setPath(d.data());  if(!dir.exists()){    dir.mkdir(d.data());    chmod(d.data(), S_IRWXU);  }  identity = new KMIdentity;  cfg->setGroup("General");  firstStart = cfg->readBoolEntry("first-start", TRUE);  foldersPath = cfg->readEntry("folders", "");  acctPath = cfg->readEntry("accounts", foldersPath + "/.kmail-accounts");  if (foldersPath.isEmpty())  {    foldersPath = QDir::homeDirPath() + QString("/Mail");    transferMail();  }  folderMgr = new KMFolderMgr(foldersPath);  acctMgr   = new KMAcctMgr(acctPath);  filterMgr = new KMFilterMgr;  filterActionDict = new KMFilterActionDict;  addrBook  = new KMAddrBook;  initFolders(cfg);  acctMgr->readConfig();  filterMgr->readConfig();  addrBook->readConfig();  if(addrBook->load() == IO_FatalError)    {      KMsgBox::message(0,i18n("KMail error"),		       i18n("Loading addressbook failed"));    }  KMMessage::readConfig();  msgSender = new KMSender;  assert(msgSender != NULL);  setSignalHandler(signalHandler);}