Skip to content

Commit

Permalink
Prevent dereferencing NULL pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
cjee21 committed Jan 31, 2025
1 parent abc3db7 commit 9b2506d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/MediaInfo/Audio/File_Adm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,7 @@ class file_adm_private : public tfsxml
file_adm_private()
{
auto OldLocale_Temp = setlocale(LC_NUMERIC, nullptr);
if (*OldLocale_Temp != 'C' || *(OldLocale_Temp + 1)) {
if (OldLocale_Temp && (*OldLocale_Temp != 'C' || *(OldLocale_Temp + 1))) {
OldLocale = OldLocale_Temp;
setlocale(LC_NUMERIC, "C");
}
Expand Down

0 comments on commit 9b2506d

Please sign in to comment.