Fix crash in new phone formatting.
This commit is contained in:
parent
df15c67dab
commit
88a2f05c6d
1 changed files with 3 additions and 0 deletions
|
@ -355,6 +355,9 @@ FormatResult CountriesInstance::format(FormatArgs args) {
|
|||
? QVector<int>()
|
||||
: QVector<int>{ codeSize };
|
||||
auto groupSize = 0;
|
||||
if (bestCallingCodePtr->patterns.empty()) {
|
||||
return FormatResult{ .groups = std::move(groups) };
|
||||
}
|
||||
for (const auto &c : bestCallingCodePtr->patterns.front()) {
|
||||
if (c == ' ') {
|
||||
groups.push_back(base::take(groupSize));
|
||||
|
|
Loading…
Reference in a new issue