Skip to content

Commit

Permalink
Fixed a crash that could occur (was occuring with o.timetag) when rem…
Browse files Browse the repository at this point in the history
…oving messages with duplicate addresses would encounter a message with a NULL address
  • Loading branch information
maccallum committed Jul 16, 2023
1 parent a921279 commit 874edd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osc_bundle_u.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ static t_osc_err osc_bundle_u_addMsg_impl(t_osc_bndl_u *bndl, t_osc_msg_u *msg,
t_osc_msg_u *m = bndl->msghead;
while(m){
t_osc_msg_u *next = m->next;
if(!strcmp(address, osc_message_u_getAddress(m))){
const char * const messageaddr = osc_message_u_getAddress(m);
if(messageaddr && !strcmp(address, messageaddr)){
osc_bundle_u_removeMsg(bndl, m);
osc_message_u_free(m);
bndl->msgcount--;
Expand Down

0 comments on commit 874edd2

Please sign in to comment.