ICU-20863 Regex Named Capture map, add a missing nullptr check.

This commit is contained in:
Andy Heninger 2019-10-24 15:23:40 -07:00
parent 84f6735fde
commit e94657e614

View File

@ -850,7 +850,7 @@ void RegexPattern::dumpPattern() const {
}
printf("Named Capture Groups:\n");
if (uhash_count(fNamedCaptureMap) == 0) {
if (!fNamedCaptureMap || uhash_count(fNamedCaptureMap) == 0) {
printf(" None\n");
} else {
int32_t pos = UHASH_FIRST;