From 9936afd45ca9f2b49ac2ec2b67fc06aec8dda7fa Mon Sep 17 00:00:00 2001
From: nehalmistry <>
Date: Tue, 19 Mar 2002 22:55:47 +0000
Subject: [PATCH] SDL now stops and closes CD only if it is playing.

---
 src/sound/sound_server.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/sound/sound_server.cpp b/src/sound/sound_server.cpp
index 8ff90a3c9..3a3b53562 100644
--- a/src/sound/sound_server.cpp
+++ b/src/sound/sound_server.cpp
@@ -1528,8 +1528,10 @@ global void QuitSound(void)
 #endif
 
 #ifdef USE_SDLCD
-    SDL_CDStop(CDRom);
-    SDL_CDClose(CDRom);
+    if (strcmp(CDMode,":off")) {
+	SDL_CDStop(CDRom);
+        SDL_CDClose(CDRom);
+    }
 #endif
 
 #ifdef USE_LIBCDA