]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/LETableReference.h
ICU-551.30.tar.gz
[apple/icu.git] / icuSources / layout / LETableReference.h
index f7eb79b2e8dfd8331feb683d88fa2fdfd008270e..de51228ead5977e87dbf31109d6663a4e456addb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * -*- c++ -*-
  *
 /*
  * -*- c++ -*-
  *
- * (C) Copyright IBM Corp. and others 2013 - All Rights Reserved
+ * (C) Copyright IBM Corp. and others 2015 - All Rights Reserved
  *
  * Range checking
  *
  *
  * Range checking
  *
@@ -313,7 +313,12 @@ LE_TRACE_TR("INFO: new RTAO")
   const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; }
 
   const T& getObject(le_uint32 i, LEErrorCode &success) const {
   const T *getAliasRAW() const { LE_DEBUG_TR("getAliasRAW<>"); return (const T*)fStart; }
 
   const T& getObject(le_uint32 i, LEErrorCode &success) const {
-    return *getAlias(i,success);
+      const T *ret = getAlias(i, success);
+      if (LE_FAILURE(success) || ret==NULL) {
+          return *(new T(0));
+      } else {
+          return *ret;
+     }
   }
   
   const T& operator()(le_uint32 i, LEErrorCode &success) const {
   }
   
   const T& operator()(le_uint32 i, LEErrorCode &success) const {