ICU-13177 Check if the other NullableValue object is null before trying to use its value.
X-SVN-Rev: 40594
This commit is contained in:
parent
97901d274e
commit
b1a2e40781
@ -260,7 +260,7 @@ class U_I18N_API NullableValue {
|
||||
|
||||
bool operator==(const NullableValue &other) const {
|
||||
// "fValue == other.fValue" returns UBool, not bool (causes compiler warnings)
|
||||
return fNull ? other.fNull : static_cast<bool>(fValue == other.fValue);
|
||||
return fNull ? other.fNull : (other.fNull ? false : static_cast<bool>(fValue == other.fValue));
|
||||
}
|
||||
|
||||
void nullify() {
|
||||
|
Loading…
Reference in New Issue
Block a user