Module: sems
Branch: 1.4
Commit: 1d86e099d358733e2ef123caef58cdafd67bc78f
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=1d86e099d358733e2ef123caef58cdafd67bc78f

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Thu Apr 19 16:46:10 2012 +0200

click2dial: b/f: fix crash when using without credentials

---

 apps/click2dial/Click2Dial.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/apps/click2dial/Click2Dial.cpp b/apps/click2dial/Click2Dial.cpp
index 111023a..cdc79b4 100644
--- a/apps/click2dial/Click2Dial.cpp
+++ b/apps/click2dial/Click2Dial.cpp
@@ -233,8 +233,13 @@ void C2DCallerDialog::process(AmEvent* event)
 
 void C2DCallerDialog::createCalleeSession()
 {
-  UACAuthCred* c = new UACAuthCred(cred.get()->realm,
-    cred.get()->user, cred.get()->pwd);
+
+  UACAuthCred* c;
+  if (cred.get()){
+    c = new UACAuthCred(cred->realm, cred->user, cred->pwd);
+  } else {
+    c = new UACAuthCred();
+  }
 
   AmB2BCalleeSession* callee_session = new C2DCalleeDialog(this, c);
   AmSipDialog& callee_dlg = callee_session->dlg;

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to