Skip to content

Commit

Permalink
Bug 1507907 - null check result of CFDateFormatterCreate. r=gandalf
Browse files Browse the repository at this point in the history
  • Loading branch information
mkmelin committed Nov 19, 2018
1 parent 97ae410 commit 5e1f20c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions intl/locale/mac/OSPreferences_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ OSPreferences::ReadDateTimePattern(DateTimeFormatStyle aDateStyle,
CFDateFormatterCreate(kCFAllocatorDefault, locale,
ToCFDateFormatterStyle(aDateStyle),
ToCFDateFormatterStyle(aTimeStyle));
if (!formatter) {
return false;
}
CFStringRef format = CFDateFormatterGetFormat(formatter);
CFRelease(locale);

Expand Down

0 comments on commit 5e1f20c

Please sign in to comment.