[HarfBuzz] harfbuzz-ng: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue Apr 27 20:28:44 PDT 2010


 src/hb-object-private.h |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit c165f25410f817d248ad5d07e1827d33efd1b0a0
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Apr 27 23:28:10 2010 -0400

    [object] Actually handle malloc() failure
    
    Caught by John Daggett.

diff --git a/src/hb-object-private.h b/src/hb-object-private.h
index 610ae68..163c5c1 100644
--- a/src/hb-object-private.h
+++ b/src/hb-object-private.h
@@ -83,10 +83,12 @@ typedef struct {
 
 #define HB_OBJECT_DO_CREATE(Type, obj) \
   HB_LIKELY (( \
-	     (obj) = (Type *) calloc (1, sizeof (Type)), \
-	     HB_OBJECT_DO_INIT_EXPR (obj), \
-	     HB_OBJECT_DEBUG_OUT (obj), \
-	     (obj) \
+	       ( \
+		 ((obj) = (Type *) calloc (1, sizeof (Type))) && \
+		 HB_OBJECT_DO_INIT_EXPR (obj) && \
+		 HB_OBJECT_DEBUG_OUT (obj) \
+	       ), \
+	       (obj) \
 	     ))
 
 #define HB_OBJECT_DO_REFERENCE(obj) \



More information about the HarfBuzz mailing list