diff --git a/include/osmocom/mgcp/mgcp_internal.h b/include/osmocom/mgcp/mgcp_internal.h index 24e28b4bc..82ff6c836 100644 --- a/include/osmocom/mgcp/mgcp_internal.h +++ b/include/osmocom/mgcp/mgcp_internal.h @@ -338,7 +338,7 @@ void mgcp_conn_watchdog_kick(struct mgcp_conn *conn); #define LOGPENDP(endp, cat, level, fmt, args...) \ LOGP(cat, level, "endpoint:0x%x " fmt, \ - ENDPOINT_NUMBER(endp), \ + endp ? ENDPOINT_NUMBER(endp) : -1, \ ## args) #define LOGPCONN(conn, cat, level, fmt, args...) \