[ekiga] Made sure the opal bank frees the accounts before it loses its reference to the call manager
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Made sure the opal bank frees the accounts before it loses its reference to the call manager
- Date: Wed, 6 Feb 2013 02:41:03 +0000 (UTC)
commit ad321c217a5363d9b0276793f17d330f9c828987
Author: Julien Puydt <jpuydt free fr>
Date: Wed Feb 6 03:40:29 2013 +0100
Made sure the opal bank frees the accounts before it loses its reference to the call manager
lib/engine/components/opal/opal-bank.cpp | 8 ++++++++
lib/engine/components/opal/opal-bank.h | 2 +-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-bank.cpp b/lib/engine/components/opal/opal-bank.cpp
index 0947cad..7782166 100644
--- a/lib/engine/components/opal/opal-bank.cpp
+++ b/lib/engine/components/opal/opal-bank.cpp
@@ -96,6 +96,14 @@ Opal::Bank::Bank (Ekiga::ServiceCore& core):
g_slist_free (accounts);
}
+Opal::Bank::~Bank ()
+{
+ // do it forcibly so we're sure the accounts are freed before our
+ // reference to the call manager. Indeed they try to unregister from
+ // presence when killed, and that gives a crash if the call manager
+ // is already gone!
+ Ekiga::RefLister<Opal::Account>::remove_all_objects ();
+}
bool
Opal::Bank::populate_menu (Ekiga::MenuBuilder & builder)
diff --git a/lib/engine/components/opal/opal-bank.h b/lib/engine/components/opal/opal-bank.h
index ddb9b56..f2ad7d0 100644
--- a/lib/engine/components/opal/opal-bank.h
+++ b/lib/engine/components/opal/opal-bank.h
@@ -62,7 +62,7 @@ public:
Bank (Ekiga::ServiceCore &_core);
- virtual ~Bank () { }
+ ~Bank ();
bool populate_menu (Ekiga::MenuBuilder & builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]