[ekiga] Replace a crash with a leak (of the Opal::Call objects)



commit 0f6f4998c304f85aec4cedce941053b101896fe8
Author: Julien Puydt <jpuydt free fr>
Date:   Mon Feb 11 20:27:17 2013 +0100

    Replace a crash with a leak (of the Opal::Call objects)

 lib/engine/components/opal/opal-call-manager.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-call-manager.cpp b/lib/engine/components/opal/opal-call-manager.cpp
index 08a19fb..3500e6c 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -745,7 +745,9 @@ void CallManager::get_video_options (CallManager::VideoOptions & options) const
 void
 CallManager::create_call_in_main (Opal::Call* _call)
 {
-  boost::shared_ptr<Opal::Call> call(_call);
+  // beware that opal puts calls in PSafePtr objects,
+  // and hence we must not delete them ourselves
+  boost::shared_ptr<Opal::Call> call(_call, null_deleter ());
 
   // FIXME: we should check it worked, but what do we do if it doesn't?
   boost::shared_ptr<Ekiga::CallCore> ccore = call_core.lock ();


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