aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/telephony-and-music
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--doc/examples/telephony-and-music/monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/examples/telephony-and-music/monitor.c b/doc/examples/telephony-and-music/monitor.c
index 34b90a4..bf3e290 100644
--- a/doc/examples/telephony-and-music/monitor.c
+++ b/doc/examples/telephony-and-music/monitor.c
@@ -29,6 +29,8 @@ static int callback(const char *message, void *user_data)
{
char *msg = NULL;
size_t len = 0;
+ if (message == 0)
+ return 1;
while ((len < 2047) && message[len])
len++;
msg = malloc((len + 1) * sizeof(char));