Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 9266)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 9268)
@@ -194,6 +194,4 @@
           this,     SLOT(slotNewClkCorrections(QList<t_clkCorr>)));
 
-
-
   // Combination Method
   // ------------------
@@ -409,6 +407,8 @@
       continue;
     }
-    else if (ephLast->checkState() != t_eph::ok) {
-      emit newMessage("bncComb: eph not ok for "  + prn.mid(0,3).toLatin1(), true);
+    else if (ephLast->checkState() == t_eph::bad ||
+             ephLast->checkState() == t_eph::outdated ||
+             ephLast->checkState() == t_eph::unhealthy) {
+      emit newMessage("bncComb: ephLast not ok for "  + prn.mid(0,3).toLatin1(), true);
       delete newCorr;
       continue;
@@ -418,5 +418,6 @@
         newCorr->_eph = ephLast;
       }
-      else if (ephPrev && ephPrev->IOD() == newCorr->_iod) {
+      else if (ephPrev && ephPrev->checkState() == t_eph::ok &&
+               ephPrev->IOD() == newCorr->_iod) {
         newCorr->_eph = ephPrev;
         switchToLastEph(ephLast, newCorr);
@@ -434,6 +435,4 @@
     QVector<cmbCorr*>& corrs = _buffer[sys][newCorr->_time].corrs;
     corrs.push_back(newCorr);
-
-
   }
 
@@ -709,6 +708,7 @@
       ColumnVector xc(6);
       ColumnVector vv(3);
-      eph->getCrd(_resTime, xc, vv, false);
-
+      if (eph->getCrd(_resTime, xc, vv, false) != success) {
+        continue;
+      }
       out << _resTime.datestr().c_str() << " "
           << _resTime.timestr().c_str() << " ";
@@ -762,5 +762,8 @@
     corr->_eph->setClkCorr(dynamic_cast<const t_clkCorr*>(&clkCorr));
     corr->_eph->setOrbCorr(dynamic_cast<const t_orbCorr*>(&orbCorr));
-    corr->_eph->getCrd(_resTime, xc, vv, true);
+    if (corr->_eph->getCrd(_resTime, xc, vv, true) != success) {
+      delete corr;
+      continue;
+    }
 
     // Correction Phase Center --> CoM
