ICU-7216 Add U_FAILURE check in unum_open()

X-SVN-Rev: 27884
This commit is contained in:
Claire Ho 2010-03-30 21:46:11 +00:00
parent 04f3398d30
commit 9f7990c11a

View file

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 1996-2009, International Business Machines
* Copyright (C) 1996-2010, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* Modification History:
@ -99,6 +99,9 @@ unum_open( UNumberFormatStyle style,
*status = U_MEMORY_ALLOCATION_ERROR;
return 0;
}
if (U_FAILURE(*status)) {
return 0;
}
retVal = (UNumberFormat*)new DecimalFormat(pat, syms, *parseErr, *status);
if(retVal == 0) {