]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/msfmrgts.cpp
ICU-8.11.tar.gz
[apple/icu.git] / icuSources / test / intltest / msfmrgts.cpp
index 343d135a55fa77d661f791e9ef396806b6261813..97465a09be7d599bc822510835cde6a40725030f 100644 (file)
@@ -1,6 +1,6 @@
 /***********************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1997-2004, International Business Machines Corporation
+ * Copyright (c) 1997-2005, International Business Machines Corporation
  * and others. All Rights Reserved.
  ***********************************************************************/
  
@@ -757,8 +757,12 @@ void MessageFormatRegressionTest::Test4118594()
     pp.setIndex(0);
     Formattable *newobjs = mf->parse(result, pp, count1);
     // newobjs now equals {new Double(3.1)}
-    if (newobjs[0].getDouble() != 3.1)
-        errln( UnicodeString("newobjs[0] = ") + newobjs[0].getDouble());
+    if (newobjs == NULL) {
+        dataerrln("Error calling MessageFormat::parse");
+    } else {
+        if (newobjs[0].getDouble() != 3.1)
+            errln( UnicodeString("newobjs[0] = ") + newobjs[0].getDouble());
+    }
 
     delete [] objs;
     delete [] newobjs;