Minor
This commit is contained in:
parent
f521a28b4a
commit
9c767d075d
|
@ -146,27 +146,21 @@ hb_shape_plan_create2 (hb_face_t *face,
|
||||||
hb_feature_t *features = nullptr;
|
hb_feature_t *features = nullptr;
|
||||||
int *coords = nullptr;
|
int *coords = nullptr;
|
||||||
|
|
||||||
if (unlikely (!face))
|
|
||||||
face = hb_face_get_empty ();
|
|
||||||
if (unlikely (!props))
|
if (unlikely (!props))
|
||||||
return hb_shape_plan_get_empty ();
|
goto bail;
|
||||||
if (num_user_features && !(features = (hb_feature_t *) calloc (num_user_features, sizeof (hb_feature_t))))
|
if (num_user_features && !(features = (hb_feature_t *) calloc (num_user_features, sizeof (hb_feature_t))))
|
||||||
return hb_shape_plan_get_empty ();
|
goto bail;
|
||||||
if (num_coords && !(coords = (int *) calloc (num_coords, sizeof (int))))
|
if (num_coords && !(coords = (int *) calloc (num_coords, sizeof (int))))
|
||||||
{
|
goto bail;
|
||||||
free (features);
|
|
||||||
return hb_shape_plan_get_empty ();
|
|
||||||
}
|
|
||||||
if (!(shape_plan = hb_object_create<hb_shape_plan_t> ()))
|
if (!(shape_plan = hb_object_create<hb_shape_plan_t> ()))
|
||||||
{
|
goto bail;
|
||||||
free (coords);
|
|
||||||
free (features);
|
|
||||||
return hb_shape_plan_get_empty ();
|
|
||||||
}
|
|
||||||
|
|
||||||
assert (props->direction != HB_DIRECTION_INVALID);
|
assert (props->direction != HB_DIRECTION_INVALID);
|
||||||
|
|
||||||
|
if (unlikely (!face))
|
||||||
|
face = hb_face_get_empty ();
|
||||||
hb_face_make_immutable (face);
|
hb_face_make_immutable (face);
|
||||||
|
|
||||||
shape_plan->custom_shaper_list = shaper_list;
|
shape_plan->custom_shaper_list = shaper_list;
|
||||||
shape_plan->face_unsafe = face;
|
shape_plan->face_unsafe = face;
|
||||||
shape_plan->props = *props;
|
shape_plan->props = *props;
|
||||||
|
@ -189,13 +183,14 @@ hb_shape_plan_create2 (hb_face_t *face,
|
||||||
num_user_features,
|
num_user_features,
|
||||||
coords,
|
coords,
|
||||||
num_coords)))
|
num_coords)))
|
||||||
{
|
goto bail;
|
||||||
free (coords);
|
|
||||||
free (features);
|
|
||||||
return hb_shape_plan_get_empty ();
|
|
||||||
}
|
|
||||||
|
|
||||||
return shape_plan;
|
return shape_plan;
|
||||||
|
|
||||||
|
bail:
|
||||||
|
free (coords);
|
||||||
|
free (features);
|
||||||
|
return hb_shape_plan_get_empty ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue