[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdemultimedia/kscd
From:       Shaheed Haque <srhaque () iee ! org>
Date:       2005-03-23 3:53:48
Message-ID: 20050323035348.A9E003CC () office ! kde ! org
[Download RAW message or body]

CVS commit by shaheed: 

Fix crash on missing CD. We forgot to guard the per-track processing with
the test "do I have a CD?".


  M +33 -31    kcompactdisc.cpp   1.2


--- kdemultimedia/kscd/kcompactdisc.cpp  #1.1:1.2
@@ -317,4 +317,5 @@ void KCompactDisc::timerExpired()
     if (WM_CDS_NO_DISC(m_status))
     {
+        m_discId = (unsigned)-1;
         m_previousDiscId = 0;
     }
@@ -364,5 +365,4 @@ void KCompactDisc::timerExpired()
             emit discChanged(m_discId);
         }
-    }
 
     // Per-event processing.
@@ -384,5 +384,4 @@ void KCompactDisc::timerExpired()
     {
         m_previousStatus = m_status;
-        kdDebug() << m_device << " status change to " << discStatus(m_status) << endl;
 
         // If we are not playing, then we are either paused, or stopped.
@@ -400,4 +399,7 @@ void KCompactDisc::timerExpired()
         }
     }
+    }
+
+    // Now that we have incurred any delays caused by the signals, we'll start the timer.
     timer.start(1000, true);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic