[ekiga] Made the opal account code handle when the presentity obtained is null



commit 0452ff52d873a289aee040fbeed21aaab3b45ad5
Author: Snark <jpuydt gnome org>
Date:   Tue Jan 11 20:53:56 2011 +0100

    Made the opal account code handle when the presentity obtained is null

 lib/engine/components/opal/opal-account.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index a44916c..868d434 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -294,7 +294,8 @@ void Opal::Account::enable ()
 
   boost::shared_ptr<Sip::EndPoint> endpoint = core.get<Sip::EndPoint> ("opal-sip-endpoint");
   endpoint->subscribe (*this);
-  presentity->Open ();
+  if (presentity)
+    presentity->Open ();
 
   updated ();
   trigger_saving ();
@@ -308,7 +309,8 @@ void Opal::Account::disable ()
   boost::shared_ptr<Sip::EndPoint> endpoint = core.get<Sip::EndPoint> ("opal-sip-endpoint");
   endpoint->unsubscribe (*this);
 
-  presentity->Close ();
+  if (presentity)
+    presentity->Close ();
 
   updated ();
   trigger_saving ();
@@ -498,7 +500,8 @@ Opal::Account::publish (const Ekiga::PersonalDetails& details)
     if (presence == "online")
       personal_state = OpalPresenceInfo::Available;
 
-    presentity->SetLocalPresence (personal_state, details.get_status ());
+    if (presentity)
+      presentity->SetLocalPresence (personal_state, details.get_status ());
   }
 }
 



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