Fix nullptr de-reference failure if both blobs in a subset test are 0 in size

This commit is contained in:
ckitagawa 2020-01-24 15:39:02 -05:00
parent ed857c4680
commit 49b98e8650
1 changed files with 4 additions and 1 deletions

View File

@ -99,6 +99,9 @@ hb_subset_test_check (hb_face_t *expected,
expected_blob = hb_face_reference_table (expected, table);
actual_blob = hb_face_reference_table (actual, table);
fprintf(stderr, "comparing %c%c%c%c, expected %d bytes, actual %d bytes\n", HB_UNTAG(table), hb_blob_get_length(expected_blob), hb_blob_get_length (actual_blob));
if (hb_blob_get_length (expected_blob) != 0 ||
hb_blob_get_length (actual_blob) != 0)
hb_test_assert_blobs_equal (expected_blob, actual_blob);
hb_blob_destroy (expected_blob);
hb_blob_destroy (actual_blob);