]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/astrotst.cpp
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / test / intltest / astrotst.cpp
index 0a40f540459d5cdb26bdb7b448327cf9f630d8bd..ba7b571139696ddef12b3e2b3a1de7571f8704bd 100644 (file)
@@ -1,6 +1,6 @@
 /********************************************************************
  * COPYRIGHT:
- * Copyright (c) 1996-2004, International Business Machines Corporation and
+ * Copyright (c) 1996-2006, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 
@@ -277,6 +277,10 @@ void AstroTest::TestSunriseTimes(void) {
   DateFormat *df_t  = DateFormat::createTimeInstance(DateFormat::MEDIUM,Locale::getUS());
   DateFormat *df_d  = DateFormat::createDateInstance(DateFormat::MEDIUM,Locale::getUS());
   DateFormat *df_dt = DateFormat::createDateTimeInstance(DateFormat::MEDIUM, DateFormat::MEDIUM, Locale::getUS());
+  if(!df_t || !df_d || !df_dt) {
+    errln("couldn't create dateformats.");
+    return;
+  }
   df_t->adoptTimeZone(tz->clone());
   df_d->adoptTimeZone(tz->clone());
   df_dt->adoptTimeZone(tz->clone());