From cf2495919d1b7e4e85d3e097dca0a9f0f917f79a Mon Sep 17 00:00:00 2001 From: Eric Mader Date: Mon, 31 Jul 2006 20:50:52 +0000 Subject: [PATCH] ICU-4744 code review changes. X-SVN-Rev: 19933 --- icu4c/source/layout/LEGlyphStorage.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/icu4c/source/layout/LEGlyphStorage.cpp b/icu4c/source/layout/LEGlyphStorage.cpp index 2ecd1287145..42824c36112 100644 --- a/icu4c/source/layout/LEGlyphStorage.cpp +++ b/icu4c/source/layout/LEGlyphStorage.cpp @@ -119,6 +119,11 @@ le_int32 LEGlyphStorage::allocatePositions(LEErrorCode &success) return -1; } + if (fPositions != NULL) { + success = LE_INTERNAL_ERROR; + return -1; + } + fPositions = LE_NEW_ARRAY(float, 2 * (fGlyphCount + 1)); if (fPositions == NULL) { @@ -136,6 +141,11 @@ le_int32 LEGlyphStorage::allocateAuxData(LEErrorCode &success) return -1; } + if (fAuxData != NULL) { + success = LE_INTERNAL_ERROR; + return -1; + } + fAuxData = LE_NEW_ARRAY(le_uint32, fGlyphCount); if (fAuxData == NULL) {