summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/freetype/src/psaux/psstack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/freetype/src/psaux/psstack.c')
-rw-r--r--src/3rdparty/freetype/src/psaux/psstack.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/3rdparty/freetype/src/psaux/psstack.c b/src/3rdparty/freetype/src/psaux/psstack.c
index 6659068001..797486588a 100644
--- a/src/3rdparty/freetype/src/psaux/psstack.c
+++ b/src/3rdparty/freetype/src/psaux/psstack.c
@@ -37,7 +37,7 @@
#include "psft.h"
-#include FT_INTERNAL_DEBUG_H
+#include <freetype/internal/ftdebug.h>
#include "psglue.h"
#include "psfont.h"
@@ -54,20 +54,18 @@
FT_Error* e,
FT_UInt stackSize )
{
- FT_Error error = FT_Err_Ok; /* for FT_NEW */
-
+ FT_Error error; /* for FT_QNEW */
CF2_Stack stack = NULL;
- if ( !FT_NEW( stack ) )
- {
- /* initialize the structure; FT_NEW zeroes it */
- stack->memory = memory;
- stack->error = e;
- }
+ if ( FT_QNEW( stack ) )
+ return NULL;
+
+ stack->memory = memory;
+ stack->error = e;
/* allocate the stack buffer */
- if ( FT_NEW_ARRAY( stack->buffer, stackSize ) )
+ if ( FT_QNEW_ARRAY( stack->buffer, stackSize ) )
{
FT_FREE( stack );
return NULL;