Index: trunk/BNC/src/RTCM/RTCM2Decoder.cpp
===================================================================
--- trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 6441)
+++ trunk/BNC/src/RTCM/RTCM2Decoder.cpp	(revision 6442)
@@ -291,6 +291,4 @@
       prn = sys + QString("%1").arg(corr->PRN - 200, 2, 10, QChar('0'));
     }
-
-    const t_ephPair* ePair = ephPair(prn); 
 
     double L1 = 0;
@@ -354,11 +352,9 @@
 
       // Select corresponding ephemerides
-      if (ePair) {
-        if      (ePair->last && ePair->last->IOD() == IODcorr) {
-          eph = ePair->last;
-        }
-        else if (ePair->prev && ePair->prev->IOD() == IODcorr) {
-          eph = ePair->prev;
-        }
+      if      (ephLast(prn) && ephLast(prn)->IOD() == IODcorr) {
+        eph = ephLast(prn);
+      }
+      else if (ephPrev(prn) && ephPrev(prn)->IOD() == IODcorr) {
+        eph = ephPrev(prn);
       }
 
