FR 10 then IB 7849 at Madrid
Dublin → Madrid → Riga
Timetable, Madrid time
22:35FR 10 from Dublin at the gate
17:15IB 7849 to Riga leaves the gate
18 h 40 apart on the timetable, overnight
IB 7849 leaves 18 h 40 after FR 10 arrives on the timetable: more than half a day, so not a connection we count.