Skip to content

Commit 7eed3c7

Browse files
committed
prevent crash if path callbacks are not disabled
1 parent 959e26b commit 7eed3c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

picoquic/quicctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ void picoquic_delete_path(picoquic_cnx_t* cnx, int path_index)
17031703
}
17041704

17051705
/* Signal to the application */
1706-
if (cnx->are_path_callbacks_enabled &&
1706+
if (cnx->are_path_callbacks_enabled && cnx->callback_fn != NULL &&
17071707
cnx->callback_fn(cnx, path_x->unique_path_id, NULL, 0, picoquic_callback_path_deleted,
17081708
cnx->callback_ctx, path_x->app_path_ctx) != 0) {
17091709
picoquic_connection_error_ex(cnx, PICOQUIC_TRANSPORT_INTERNAL_ERROR, 0, "Path deleted callback failed.");

0 commit comments

Comments
 (0)