Skip to content

Commit

Permalink
Merge pull request #1272 from stevencohn/1268-skip-null-page
Browse files Browse the repository at this point in the history
Check for null page
  • Loading branch information
stevencohn authored Jan 20, 2024
2 parents 09487c3 + 9b4f735 commit 1f965dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions OneMore/Commands/Tagging/HashtagScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,14 @@ private async Task<bool> ScanPage(
return false;
}

// avoid defect https://github.com/stevencohn/OneMore/issues/1268
// GetPage throws generic COM exception and returns null...
if (page == null)
{
logger.WriteLine($"skipping null page {pageID} '{path}'");
return false;
}

var title = page.Title;
var titleID = page.TitleID;
var scanner = factory.CreatePageScanner(page.Root);
Expand Down

0 comments on commit 1f965dd

Please sign in to comment.