From 9a277a277a70e6675b10eb4337ccdfe1492f33bb Mon Sep 17 00:00:00 2001 From: Dan Anderson Date: Wed, 21 Jan 2026 00:39:15 -0500 Subject: [PATCH] PR 3007 Fix Seg Fault (#3008) Co-authored-by: KD2YCU --- mlx/distributed/utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mlx/distributed/utils.cpp b/mlx/distributed/utils.cpp index ef52ec09..2de994cf 100644 --- a/mlx/distributed/utils.cpp +++ b/mlx/distributed/utils.cpp @@ -184,7 +184,9 @@ TCPSocket TCPSocket::connect( break; } - cb(attempt, wait); + if (cb != nullptr) { + cb(attempt, wait); + } if (wait > 0) { std::this_thread::sleep_for(std::chrono::milliseconds(wait)); }