From edc3a6fa9a58bf28aabcb85b2b7e37cfb1b15ec1 Mon Sep 17 00:00:00 2001 From: Skef Iterum Date: Fri, 27 Mar 2026 15:03:56 -0700 Subject: [PATCH] [test] Improve error message for missing font files in parity checker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace bare assert(blob) with a proper error message when hb_blob_create_from_file_or_fail returns NULL. This gives users a clear indication of which file couldn't be loaded instead of a cryptic assertion failure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- test/fuzzing/hb-depend-closure-parity-main.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/fuzzing/hb-depend-closure-parity-main.cc b/test/fuzzing/hb-depend-closure-parity-main.cc index a480e9358..1d89d2d2e 100644 --- a/test/fuzzing/hb-depend-closure-parity-main.cc +++ b/test/fuzzing/hb-depend-closure-parity-main.cc @@ -286,7 +286,11 @@ int main (int argc, char **argv) { file_count++; hb_blob_t *blob = hb_blob_create_from_file_or_fail (argv[i]); - assert (blob); + if (!blob) + { + fprintf (stderr, "Error: Could not load font file: %s\n", argv[i]); + return 1; + } unsigned len = 0; const char *font_data = hb_blob_get_data (blob, &len);