FR 2437 then LO 2162 at Madrid
Rome → Madrid → Krakow
Timetable, Madrid time
22:45FR 2437 from Rome at the gate
20:00LO 2162 to Krakow leaves the gate
21 h 15 apart on the timetable, overnight
LO 2162 leaves 21 h 15 after FR 2437 arrives on the timetable: more than half a day, so not a connection we count.