Index: trunk/BNC/src/bnccore.cpp
===================================================================
--- trunk/BNC/src/bnccore.cpp	(revision 9821)
+++ trunk/BNC/src/bnccore.cpp	(revision 9822)
@@ -139,6 +139,12 @@
 
   delete _dateAndTimeGPS;
-  delete _rawFile;
-  delete _bncComb;
+  if (_rawFile) {
+    delete _rawFile;
+  }
+
+  if (_bncComb) {
+    delete _bncComb;
+    _bncComb = 0;
+  }
   delete _pppMain;
 }
Index: trunk/BNC/src/bncmain.cpp
===================================================================
--- trunk/BNC/src/bncmain.cpp	(revision 9821)
+++ trunk/BNC/src/bncmain.cpp	(revision 9822)
@@ -58,9 +58,10 @@
 using namespace std;
 
+
 void catch_SIGINT(int) {
   cout << "Program Interrupted by Ctrl-C" << endl;
   BNC_CORE->sigintReceived = 1;
+  BNC_CORE->stopPPP();
   BNC_CORE->stopCombination();
-  BNC_CORE->stopPPP();
   sleep(2);
   ::exit(0);
@@ -81,6 +82,15 @@
   bool       displaySet   = false;
 #endif
-  QByteArray rawFileName;
-  QString    confFileName;
+  QByteArray          rawFileName;
+  QString             confFileName;
+
+  bncWindow*          bncWin = 0;
+  t_reqcEdit*         reqcEdit = 0;
+  t_reqcAnalyze*      reqcAnalyze = 0;
+  t_sp3Comp*          sp3Comp = 0;
+  bncEphUploadCaster* casterEph = 0;
+  bncCaster*          caster = 0;
+  bncRawFile*         rawFile =  0;
+  bncGetThread*       getThread = 0;
 
   QByteArray printHelp =
@@ -98,5 +108,5 @@
       "   proxyPort         {Proxy port [integer number]}\n"
       "   sslCaCertPath     {Full path to SSL certificates [character string]}\n"
-      "   sslClientCertPath {Full path to client SSL certificates [character string]}\n"      
+      "   sslClientCertPath {Full path to client SSL certificates [character string]}\n"
       "   sslIgnoreErrors   {Ignore SSL authorization errors [integer number: 0=no,2=yes]}\n"
       "\n"
@@ -422,12 +432,5 @@
   }
 
-  bncWindow*          bncWin = 0;
-  t_reqcEdit*         reqcEdit = 0;
-  t_reqcAnalyze*      reqcAnalyze = 0;
-  t_sp3Comp*          sp3Comp = 0;
-  bncEphUploadCaster* casterEph = 0;
-  bncCaster*          caster = 0;
-  bncRawFile*         rawFile =  0;
-  bncGetThread*       getThread = 0;
+
 
 #ifndef WIN32
@@ -505,4 +508,7 @@
 
     BNC_CORE->connect(caster, SIGNAL(getThreadsFinished()), app->instance(), SLOT(quit()));
+
+    BNC_CORE->connect (caster, SIGNAL(mountPointsRead(QList<bncGetThread*>)), app->instance(), SLOT(quit()));
+
     BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " (" BNC_OS ") ==========", true);
 
@@ -535,4 +541,7 @@
   // ---------------------
   app->exec();
+
+  // End of application
+  // ------------------
   if (interactive) {
     delete bncWin;
