Skip to content

Commit

Permalink
add check for metadata pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMoelans committed Dec 6, 2024
1 parent 852f8fe commit 8730fa1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/crash_report_database_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ int CrashReportDatabaseWin::CleanDatabase(time_t lockfile_ttl) {
time_t now = time(nullptr);

std::unique_ptr<Metadata> metadata(AcquireMetadata());
if (!metadata)
return kDatabaseError;

// Remove old reports without metadata.
while ((result = reader.NextFile(&filename)) ==
Expand Down

0 comments on commit 8730fa1

Please sign in to comment.