diff options
author | Olle E. Johansson <oej@edvina.net> | 2014-12-30 14:10:09 +0100 |
---|---|---|
committer | Olle E. Johansson <oej@edvina.net> | 2014-12-30 14:10:09 +0100 |
commit | cd373b9c1d26ede842164903c22c192b290fb098 (patch) | |
tree | 1cde92b74101e5489441ef69f0b7c343f54667be /src/ua.c | |
parent | ed7e1dcd4b45e65160f56e8e3d8127d2f41327c1 (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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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)); |