[ekiga/gnome-2-26] Fixed a crash on some calls



commit 61512c3afec95d458f93d6e83dddff6f6ab1ce83
Author: Damien Sandras <dsandras seconix com>
Date:   Wed May 20 09:20:09 2009 +0200

    Fixed a crash on some calls
    
    The problem is that a std::string was built from a pointer without checking for NULL
---
 lib/engine/components/opal/opal-call-manager.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lib/engine/components/opal/opal-call-manager.cpp b/lib/engine/components/opal/opal-call-manager.cpp
index d7eb9d6..0d9f94f 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -620,8 +620,12 @@ void CallManager::get_video_options (CallManager::VideoOptions & options) const
 OpalCall *CallManager::CreateCall ()
 {
   gmref_ptr<Ekiga::CallCore> call_core = core.get ("call-core"); // FIXME: threaded?
+  gmref_ptr<Opal::Call> call;
 
-  gmref_ptr<Opal::Call> call (new Opal::Call (*this, core));
+  if (uri != 0)
+    call = gmref_ptr<Opal::Call> (new Opal::Call (*this, core, (const char *) uri));
+  else
+    call = gmref_ptr<Opal::Call> (new Opal::Call (*this, core, ""));
   call_core->add_call (call, gmref_ptr<CallManager>(this));
 
   return call.get ();



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