From 0245e9867ccbfd51cd5857684128f93cba7701af Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 9 Sep 2012 13:15:33 +0200 Subject: [PATCH] Fix NULL deference if no ATA bus is present. --- sortix/ata.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sortix/ata.cpp b/sortix/ata.cpp index 173e6698..d7ffee1d 100644 --- a/sortix/ata.cpp +++ b/sortix/ata.cpp @@ -75,6 +75,8 @@ namespace Sortix void DetectBus(unsigned busid, uint16_t ioport, uint16_t altio) { ATABus* bus = ATA::CreateBus(ioport, altio); + if ( !bus ) + return; DetectDrive(busid, bus, 0); DetectDrive(busid, bus, 1); }