[ekiga] Fixed possible crash when deleting an account.



commit d0f2fb4a00b3d039a9cad9ec9e5a4a77ac506318
Author: Michael Rickmann <mrickma gwdg be>
Date:   Thu Oct 29 20:24:42 2009 +0100

    Fixed possible crash when deleting an account.

 lib/engine/components/opal/opal-account.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 4171400..6abd5c2 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -333,8 +333,6 @@ void Opal::Account::remove ()
   endpoint->unsubscribe (*this);
 
   trigger_saving ();
-
-  removed ();
 }
 
 
@@ -499,6 +497,10 @@ Opal::Account::handle_registration_event (RegistrationState state_,
 
     status = _("Unregistered");
     updated ();
+    /* delay destruction of this account until the
+       unsubscriber thread has called back */
+    if (dead)
+      removed ();
     break;
 
   case UnregistrationFailed:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]