crash when no contacts are available
the error handling is neede, but at least there is no segfault.
please review.
ekiga/ekiga/src$ svn diff
Index: gui/main.cpp
===================================================================
--- gui/main.cpp (Revision 7823)
+++ gui/main.cpp (Arbeitskopie)
@@ -1470,8 +1470,17 @@
pos = uri.find ("@");
if (pos == std::string::npos && uri.find ("h323:") == std::string::npos) {
std::list<std::string>::iterator it = mw->priv->accounts.begin ();
- uri = uri + "@" + (*it);
- ekiga_main_window_set_call_url (mw, uri.c_str ());
+
+ if (it != mw->priv->accounts.end ())
+ {
+ uri = uri + "@" + (*it);
+ ekiga_main_window_set_call_url (mw, uri.c_str ());
+ }
+ else
+ {
+ //TODO: how to display an error message?
+ cerr << "Cannot place call, there is no account to call." << endl;
+ }
}
pos = uri.find_first_of (' ');
if (pos != std::string::npos)
_______________________________________________
Ekiga-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/ekiga-devel-list