8000 ICU-23062 Added null check in one spot in genrb where we know we've s… · unicode-org/icu@faa80a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit faa80a2

Browse files
richgillammarkusicu
authored andcommitted
ICU-23062 Added null check in one spot in genrb where we know we've seen crashes.
1 parent 9cc28a6 commit faa80a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

icu4c/source/tools/genrb/parse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static char *getInvariantString(ParseState* state, uint32_t *line, struct UStrin
297297

298298
if(!uprv_isInvariantUString(tokenValue->fChars, tokenValue->fLength)) {
299299
*status = U_INVALID_FORMAT_ERROR;
300-
error(*line, "invariant characters required for table keys, binary data, etc.");
300+
error((line == nullptr) ? 0 : *line, "invariant characters required for table keys, binary data, etc.");
301301
return nullptr;
302302
}
303303

0 commit comments

Comments
 (0)
0