diff --git a/llarp/pathbuilder.cpp b/llarp/pathbuilder.cpp index 34cd31dbe..f2169a90c 100644 --- a/llarp/pathbuilder.cpp +++ b/llarp/pathbuilder.cpp @@ -76,8 +76,13 @@ llarp_pathbuilder_context_free(struct llarp_pathbuilder_context* ctx) void llarp_pathbuilder_build_path(struct llarp_pathbuild_job* job) { + if (!job->context) + { + llarp::Error("failed to build path because no context is set in job"); + return; + } job->router = job->context->router; llarp_logic_queue_job(job->router->logic, {job, &llarp::pathbuilder_start_build}); } -} \ No newline at end of file +}