[base] fix logic

This commit is contained in:
Ebrahim Byagowi 2019-07-28 20:46:47 +04:30 committed by GitHub
parent 69655d5bc3
commit 87454c447d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -450,11 +450,11 @@ struct BASE
hb_position_t *base) const
{
const BaseCoord *base_coord = nullptr;
if (unlikely (!get_axis (direction).get_baseline (baseline, script_tag, language_tag, &base_coord) &&
base_coord && !base_coord->has_data ()))
if (unlikely (!get_axis (direction).get_baseline (baseline, script_tag, language_tag, &base_coord) ||
!base_coord || !base_coord->has_data ()))
return false;
if (likely (base && base_coord))
if (likely (base))
*base = base_coord->get_coord (font, get_var_store (), direction);
return true;