Commit 1e63e7c0 authored by Max Kellermann's avatar Max Kellermann

icu/Collate: initialize the error code before ucol_open()

Fixes initialization failure.
parent 33fc3af7
...@@ -48,7 +48,7 @@ IcuCollateInit(Error &error) ...@@ -48,7 +48,7 @@ IcuCollateInit(Error &error)
assert(collator == nullptr); assert(collator == nullptr);
assert(!error.IsDefined()); assert(!error.IsDefined());
UErrorCode code; UErrorCode code = U_ZERO_ERROR;
collator = ucol_open("", &code); collator = ucol_open("", &code);
if (collator == nullptr) { if (collator == nullptr) {
error.Format(icu_domain, int(code), error.Format(icu_domain, int(code),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment