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

pull/2132/head
ckitagawa 5 years ago
parent ed857c4680
commit 49b98e8650
  1. 5
      test/api/hb-subset-test.h

@ -99,7 +99,10 @@ 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));
hb_test_assert_blobs_equal (expected_blob, 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);
}

Loading…
Cancel
Save