W6 2371 then FR 7157 at Madrid
Budapest → Madrid → Dublin
Timetable, Madrid time
19:15W6 2371 from Budapest at the gate
07:50FR 7157 to Dublin leaves the gate
12 h 35 apart on the timetable, overnight
FR 7157 leaves 12 h 35 after W6 2371 arrives on the timetable: more than half a day, so not a connection we count.