From: Christian Kastner Date: Tue, 14 Jul 2026 10:15:41 +0000 (+0200) Subject: tests: export-graph-ops: exit gracefully when called w/o arguments (#25619) X-Git-Tag: upstream/0.0.10438~437 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=657e01125aa49577a62a5531fde24cbcc007006d;p=pkg%2Fggml%2Fsources%2Fllama.cpp tests: export-graph-ops: exit gracefully when called w/o arguments (#25619) Fixes a segfault when `test-export-graph-ops` is called without any arguments. --- diff --git a/tests/test-export-graph-ops.cpp b/tests/test-export-graph-ops.cpp index 7d8118dcd..46ded1398 100644 --- a/tests/test-export-graph-ops.cpp +++ b/tests/test-export-graph-ops.cpp @@ -152,6 +152,10 @@ int main(int argc, char ** argv) { init_result = common_init_from_params(params); ctx = init_result->context(); + if (!ctx) { + LOG_ERR("failed to initialize params\n"); + return 1; + } } else { #ifdef LLAMA_HF_FETCH auto [hf_repo, hf_quant] = common_download_split_repo_tag(params.model.hf_repo);