diff --git a/src/apps/cdplayer/CDAudioDevice.cpp b/src/apps/cdplayer/CDAudioDevice.cpp index 9aea159e44..69f3a7da1b 100644 --- a/src/apps/cdplayer/CDAudioDevice.cpp +++ b/src/apps/cdplayer/CDAudioDevice.cpp @@ -16,7 +16,8 @@ CDAudioDevice::CDAudioDevice(void) { FindDrives("/dev/disk"); - SetDrive(0); + if(CountDrives()>0) + SetDrive(0); } CDAudioDevice::~CDAudioDevice(void) diff --git a/src/apps/cdplayer/CDPlayer.cpp b/src/apps/cdplayer/CDPlayer.cpp index b83b60764c..53033e5921 100644 --- a/src/apps/cdplayer/CDPlayer.cpp +++ b/src/apps/cdplayer/CDPlayer.cpp @@ -56,6 +56,16 @@ CDPlayer::CDPlayer(BRect frame, const char *name, uint32 resizeMask, uint32 flag engine = new CDEngine; BuildGUI(); + + CDAudioDevice cd; + if(cd.CountDrives()<1) + { + BAlert *alert = new BAlert("CDPlayer","It appears that there are no CD drives on your" + "computer or there is no system software to support one." + " Sorry.","OK"); + alert->Go(); + be_app->PostMessage(B_QUIT_REQUESTED); + } } CDPlayer::~CDPlayer()