mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 08:21:32 +01:00
[test] Improve error message for missing font files in parity checker
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
a1114985d6
commit
edc3a6fa9a
1 file changed
+5
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user