mirror of https://github.com/freetype/freetype
* src/raster/ftraster.c (Convert_Glyph): Fix null-dereference.
This commit is contained in:
parent
c7fa00bf4e
commit
f09c5e58c2
|
@ -1996,16 +1996,18 @@
|
|||
if ( Decompose_Curve( RAS_VARS first, last, flipped ) )
|
||||
return FAILURE;
|
||||
|
||||
/* Note that ras.gProfile can stay nil if the contour was */
|
||||
/* too small to be drawn or degenerate. */
|
||||
if ( !ras.gProfile )
|
||||
continue;
|
||||
|
||||
/* we must now check whether the extreme arcs join or not */
|
||||
if ( FRAC( ras.lastY ) == 0 &&
|
||||
ras.lastY >= ras.minY &&
|
||||
ras.lastY <= ras.maxY )
|
||||
if ( ras.gProfile &&
|
||||
( ras.gProfile->flags & Flow_Up ) ==
|
||||
if ( ( ras.gProfile->flags & Flow_Up ) ==
|
||||
( ras.cProfile->flags & Flow_Up ) )
|
||||
ras.top--;
|
||||
/* Note that ras.gProfile can be nil if the contour was too small */
|
||||
/* to be drawn. */
|
||||
|
||||
lastProfile = ras.cProfile;
|
||||
if ( ras.top != ras.cProfile->offset &&
|
||||
|
@ -2017,8 +2019,7 @@
|
|||
return FAILURE;
|
||||
|
||||
/* close the `next profile in contour' linked list */
|
||||
if ( ras.gProfile )
|
||||
lastProfile->next = ras.gProfile;
|
||||
lastProfile->next = ras.gProfile;
|
||||
}
|
||||
|
||||
if ( Finalize_Profile_Table( RAS_VAR ) )
|
||||
|
|
Loading…
Reference in New Issue