]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/measure.cpp
ICU-400.40.tar.gz
[apple/icu.git] / icuSources / i18n / measure.cpp
index 03e6a7cbab947d9d6108f52666dd723ae2127ee5..361c1facb07b5c231c37d79158e7198080ecfd89 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-* Copyright (c) 2004, International Business Machines
+* Copyright (c) 2004-2008, International Business Machines
 * Corporation and others.  All Rights Reserved.
 **********************************************************************
 * Author: Alan Liu
@@ -49,8 +49,8 @@ Measure::~Measure() {
 UBool Measure::operator==(const UObject& other) const {
     const Measure* m = (const Measure*) &other;
     return getDynamicClassID() == other.getDynamicClassID() &&
-        number == m->getNumber() &&
-        *unit == m->getUnit();
+        number == m->getNumber() && 
+        (unit != NULL && *unit == m->getUnit());
 }
 
 //----------------------------------------------------------------------