mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-09 15:27:38 +00:00
ICU-7216 Add U_FAILURE check in unum_open()
X-SVN-Rev: 27884
This commit is contained in:
parent
04f3398d30
commit
9f7990c11a
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue