mirror of
https://github.com/openjdk/jdk.git
synced 2026-08-02 22:25:29 +00:00
Merge
This commit is contained in:
commit
d71c1e8a6c
@ -501,10 +501,22 @@ static inline void doDrawGlyphsPipe_getGlyphVectorLengthAndAlloc
|
||||
int *uniChars = (int *)malloc(sizeof(int) * length);
|
||||
CGSize *advances = (CGSize *)malloc(sizeof(CGSize) * length);
|
||||
|
||||
if (glyphs == NULL || advances == NULL)
|
||||
if (glyphs == NULL || uniChars == NULL || advances == NULL)
|
||||
{
|
||||
(*env)->DeleteLocalRef(env, glyphsArray);
|
||||
[NSException raise:NSMallocException format:@"%s-%s:%d", THIS_FILE, __FUNCTION__, __LINE__];
|
||||
if (glyphs)
|
||||
{
|
||||
free(glyphs);
|
||||
}
|
||||
if (uniChars)
|
||||
{
|
||||
free(uniChars);
|
||||
}
|
||||
if (advances)
|
||||
{
|
||||
free(advances);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user