Index: trunk/BNC/src/bncsinextro.cpp
===================================================================
--- trunk/BNC/src/bncsinextro.cpp	(revision 7861)
+++ trunk/BNC/src/bncsinextro.cpp	(revision 7862)
@@ -34,10 +34,5 @@
   (!sampl) ? _sampl = 1 : _sampl =  sampl;
 
-  if (!_opt->_antexFileName.empty()) {
-    _antex = new bncAntex(_opt->_antexFileName.c_str());
-  }
-  else {
-    _antex = 0;
-  }
+  _antex = 0;
 }
 
@@ -149,5 +144,6 @@
   _out << "-SITE/ANTENNA" << endl << endl;
 
-  if (_antex) {
+  if (!_opt->_antexFileName.empty()) {
+    _antex = new bncAntex(_opt->_antexFileName.c_str());
     if (_opt->_LCsGPS.size()) {
       _out << "+SITE/GPS_PHASE_CENTER" << endl;
@@ -196,4 +192,6 @@
       _out << "-SITE/BEIDOU_PHASE_CENTER" << endl << endl;
     }
+    delete _antex;
+    _antex = 0;
   }
 
