summaryrefslogtreecommitdiff
path: root/src/ua.c
diff options
context:
space:
mode:
authorOlle E. Johansson <oej@edvina.net>2014-12-30 14:10:09 +0100
committerOlle E. Johansson <oej@edvina.net>2014-12-30 14:10:09 +0100
commitcd373b9c1d26ede842164903c22c192b290fb098 (patch)
tree1cde92b74101e5489441ef69f0b7c343f54667be /src/ua.c
parented7e1dcd4b45e65160f56e8e3d8127d2f41327c1 (diff)
ua.c Do not core dump when no calls are active
Using "l" in menu.so caused a core dump.
Diffstat (limited to 'src/ua.c')
-rw-r--r--src/ua.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ua.c b/src/ua.c
index c4908c4..5aeb3bf 100644
--- a/src/ua.c
+++ b/src/ua.c
@@ -1325,6 +1325,10 @@ int ua_print_calls(struct re_printf *pf, const struct ua *ua)
{
struct le *le;
int err = 0;
+ if (!ua) {
+ err |= re_hprintf(pf, "\n--- No active calls ---\n");
+ return err;
+ }
err |= re_hprintf(pf, "\n--- List of active calls (%u): ---\n",
list_count(&ua->calls));