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

List:       kde-commits
Subject:    [simon] simonlib/simonsound: Bugfix: Avoid double-delete when using multiple recording audio devices
From:       Peter Grasch <grasch () simon-listens ! org>
Date:       2013-02-13 22:47:08
Message-ID: 20130213224708.C063DA6091 () git ! kde ! org
[Download RAW message or body]

Git commit df20dd2d2d4bfab834b36fdeb154dcb18e84c672 by Peter Grasch.
Committed on 13/02/2013 at 23:45.
Pushed by grasch into branch 'master'.

Bugfix: Avoid double-delete when using multiple recording audio devices

M  +2    -4    simonlib/simonsound/simonsoundinput.cpp

http://commits.kde.org/simon/df20dd2d2d4bfab834b36fdeb154dcb18e84c672

diff --git a/simonlib/simonsound/simonsoundinput.cpp \
b/simonlib/simonsound/simonsoundinput.cpp index 7bd44bd..e079769 100644
--- a/simonlib/simonsound/simonsoundinput.cpp
+++ b/simonlib/simonsound/simonsoundinput.cpp
@@ -136,14 +136,12 @@ bool \
SimonSoundInput::deRegisterInputClient(SoundInputClient* client, bool& done \
  kDebug() << "Deregistering input client";
 
+  bool success = true;
   if (m_activeInputClients.remove(client) == 0) {
     //wasn't active anyways
-    /*return */
-    m_suspendedInputClients.remove(client);
+    success = (m_suspendedInputClients.remove(client) != 0);
   }
 
-  bool success = true;
-
                                                   //do not need to record \
any longer  if (m_activeInputClients.isEmpty() && \
m_suspendedInputClients.isEmpty()) {  //then stop recording


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

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