]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/bms.cpp
ICU-491.11.1.tar.gz
[apple/icu.git] / icuSources / i18n / bms.cpp
index 99a45896c788ec3d1bfd7d307f798fb68f426c27..0a1de08b6fcd47d268b5bd492c220881fdaddc56 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2009, International Business Machines Corporation and Others.
+ * Copyright (C) 2008-2011, International Business Machines Corporation and Others.
  * All rights reserved.
  */
 
@@ -34,9 +34,11 @@ ucd_open(UCollator *coll, UErrorCode *status)
 U_CAPI void U_EXPORT2
 ucd_close(UCD *ucd)
 {
-    CollData *data = STATIC_CAST(CollData *, ucd);
+    if (ucd != NULL) {
+        CollData *data = STATIC_CAST(CollData *, ucd);
 
-    CollData::close(data);
+        CollData::close(data);
+    }
 }
 
 U_CAPI UCollator * U_EXPORT2