IB 52 then SK 1582 at Madrid
Málaga → Madrid → Stockholm
Timetable, Madrid time
13:15IB 52 from Málaga at the gate
12:40SK 1582 to Stockholm leaves the gate
23 h 25 apart on the timetable, overnight
SK 1582 leaves 23 h 25 after IB 52 arrives on the timetable: more than half a day, so not a connection we count.